Could not find proper versions of railties (4.1.6)


#1

Hi Community,

I am working on a Ruby on Rails project with my friend. I inherited his project and I’m trying to get the website to run.

I cloned his project, opened the workspace and clicked on “Run Project,” which led to this:

Your code is running at https://music-site-harrybui22.c9users.io.

Could not find proper version of railties (4.1.6) in any of the sources Run bundle install to install missing gems

When I look into the Gemfile.lock, railties 4.1.6 is in there. However, when I do “gem list,” railties does not show. The command rails -v yields Rails 4.1.6.

Things I’ve tried:
-uninstall, reinstall rails and railties 4.1.6
-deleting gemfile.lock (keeps coming back without gem install)
-bundle install, bundle update, gem install

Hope I can solve this with y’all, thank you!


#2

It seems you’re using the new version of rails, but the runner is stuck using the older version. To fix:

  • In the runner panel near the bottom, there’s a ‘Runner’ dropdown that you can use to select a different runner. Select the Ruby on Rails runner that says ‘Ruby on Rails (Rails Stable + Ruby 2.2)’
  • Click the Red play button again

If this doesn’t work, you might try another Rails runner listed there or run from the terminal:

$ rails s -b $IP -p $PORT

Source: https://docs.c9.io/docs/running-a-rails-app


#3

Changed the runner to ‘Ruby on Rails (Rails Stable + Ruby 2.2)’ but it yielded the same error (Could not find proper versions of railties).

However, when I ran this command: $ rails s -b $IP -p $PORT, I get a different issue. I get this:

PG::ConnectionBad
could not connect to server: Connection refused Is the server running on host “0.0.0.0” and accepting TCP/IP connections on port 5432?

This issue also pops up when using the default runner or when running ‘Ruby on Rails (Rails 4.0 + Ruby 2.1)’

Thanks.