I am using Ruby version 2.2.3 which I've upgraded from 2.1.5. The problem is when I try to execute any Rails command it won't execute and give me this error
the rails' command exists in these ruby versions 2.1.5
So when I switched back to my previous version by rbenv global 2.1.5, it is working again. Can anyone tell me whats going on here? Why I can't do anything with newer version of ruby?
Maybe try to do a gem install rails with your new version.
Related
It's supposed that I installed Ruby on Rails using RailsInstaller (Windows), but when I try to use the command:
rails -v
The command prompt shows something like:
"System can not find the specified path."
I've uninstalled Rails with 'gem' command and reinstall it, but error still alive.
Is there another way to install Ruby on Rails?
How can I solve this problem?
NOTE: Ruby\bin is in PATH variable.
I found a solution: installing the previous version of RailsInstaller.
I was trying to use: railsinstaller-3.2.0 (Ruby 2.2.4, Rails 4.2)
It worked good with: railsinstaller-3.1.1 (Ruby 2.1.8, Rails 4.2)
NOTE: I'm using W7 OS.
Check out the answer on this one. You have to add rails to path.
Installing Ruby on Rails on windows
I'm told to update my rails project from ruby version 1.9.3 to 2.1.5 but I don't know how
I updated my gem file to reflect 2.1.5, and then tried bundle install again, it seemed to work mostly...
Then I tried rake db:migrate and it couldn't handle it. so I don't think I "updated correctly"
I don't have RVM so I didn't know what to do with this answer.
Can someone please help me update my code or point me in the right direction?
You're on Windows? Check out Ruby installer here: http://rubyinstaller.org/. Should be able to update Ruby that way.
after I deploy with capistrano to a new server I see:
/shared/bundle/ruby/1.9.1/gems/
I don't even have ruby 1.9.1 installed on the server. and if i run: ruby -v
it returns 1.9.3
but in all of capisrtano actions i keep seeing 1.9.1
why is that? and how can i stop it?
thanks
Don't worry. Ruby 1.9.1 to 1.9.3 is using that path by default. It doesn't necessarily mean you are using the wrong Ruby.
I recently upgraded to ruby 1.8.7. i'm running Rails 2.3.5 and rubyGems 1.5.2.
ever since I upgraded, every time I want to start the server, i get:
undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x1022cc1c8> (NameError)
this post here advises to downgrade rugyGems to a version below 1.5.0.
downgrading doesn't seem to be the right solution..should I maybe be upgrading Ruby or Rails instead?
Also, if I upgrade to the latest ruby (1.9.2) and rails (3.0)..will my application break?
I have a very large application and can't figure out how to upgrade it without breaking the application..
That thing about version_requirements is a bug in rubygems - confirmed by their creators.
I've also participated in the bug report on the rubygems :)
gem update --system 1.5.0
performs a graceful downgrade until this is fixed.
I ran into this issue with some Rails 2.x applications and once also with 3.0.4 application, but with different error message, again, downgrading rubygems solved it.
You should use RVM so you can have both, 1.8 and 1.9.2 Ruby versions, running and you can be working with rails 2.3.x and rails 3.x the way that you want
I've got Snow Leopard with Rails 2.3.5 installed along with other versions (2.2.2 and 1.2.6). I'd like to use 2.2.2 as the webserver I want to deploy to uses a 2.2.x version of Rails. I've tried to uninstall Rails 2.3.5 but get this error:
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d rails`
Is there any other way of setting the Rails version to one of the other installed Rails versions?
You should really take look to RVM(Ruby Version Manager) it's awesome!
https://rvm.io
http://teachmetocode.com/screencasts/rvm-ruby-version-manager/
Cheers
Denis
You should be able to do this without needing to uninstall anything. You can specify the version of rails you want to create an application for by typing the following when creating a new app.
rails _2.2.2_ app_name