I'm unable to run rails new SomeApp
.
I receive the following error:
load': cannot load such file --
/home/captainawesome/.rvm/gems/ruby-2.2.0/gems/rails-4.2.0/bin/rails (LoadError)
Going through the path in: /home/captainawesome/.rvm/gems/ruby-2.2.0/gems/rails-4.2.0/bin/rails
, the bin directory does not exist.
Also, please know I can still run the rails server and console but not rails new app
.
My current setup
Ubuntu 14.04
ruby 2.2.0p0
rails 4.2.0
rvm 1.26.11
local server (not remote)
development environment
$ which rails
/home/captainawesome/.rvm/gems/ruby-2.2.0/bin/rails
$ rails -v
Bundler is using a binstub that was created for a different gem.
This is deprecated, in future versions you may need to "bundle binstub rails"
to work around a system/bundle conflict.
Rails 4.2.0
Please know this only works inside of a project.
$ which ruby
/home/captainawesome/.rvm/rubies/ruby-2.2.0/bin/ruby
$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
$which rvm
/home/captainawesome/.rvm/bin/rvm
$ rvm use
Using /home/captainawesome/.rvm/gems/ruby-2.2.0
$ rvm -v
rvm 1.26.11 (master) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
Please advise on how to correct this.
Re-install Rails, and it will solve your error:
Here's how:
And try to use separate gemsets for your Rails applications, this will allow you to quickly and automatically change your Ruby version and associated gems when you do
cd your_project_name
. Here's how.