Reputation: 81
I've seen a few other issues for this, tried their recommendations, none of them worked for me.
I've been using Rails for about a year, just started a new Rails project, and suddenly having issues. I uninstalled and tried reinstalling all of Ruby and Rails. Ruby is fine, but not Rails.
When I enter rails s
, I get the can't find gem railties
. My current Ruby version is ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin15]
, even though I've been trying to set ruby 2.3.0 through rbenv.
If I try rails -v
to see what version I'm running, I get the same error. I'm using Mac OS X El Capitan version 10.11.6.
Upvotes: 5
Views: 21925
Reputation: 189
rvm osx-ssl-certs
rvm cleanup all
rvm reset
It works for me! Maybe some commands useless, I just retell the history of my shell :)
Upvotes: 12
Reputation: 493
This solution worked for me while i have been using Ubuntu 16.04.
Make sure that rvm(Ruby version manager) is accessible to your terminal, by simply execute command
$ rvm -v
Now run following commands=>
$ rvm gemset list
Output of above command will be
gemsets for ruby-2.5.3 (found in /home/rails/.rvm/gems/ruby-2.5.3)
=>(default)
carserv
global
Now set correct gemset instead of default. in my project it is carserv. For that use following command
$ rvm gemset use carserv
It's time to start your rails server.
$ rails server
I hope this process will help you. :)
Upvotes: 0
Reputation: 81
For some reason, I can get it to work using bundle exec rails s. It's not ideal, but, if that's what it takes I'll just keep using bundle exec rails s.
UPDATE: This no longer works, it was only temporary. I had rbenv installed, and no matter what version I tried to set as local or global, it didn't set. Turned out, that my path was messed up, and it was hitting usr/local/bin first rather than hitting .rbenv first. Someone was able to help me offline. :)
Upvotes: 1
Reputation: 6253
Below is some step by step to install rails with RBENV, probably you can follow along, what command that probably you missed
Upvotes: 4