开发者

Rails 2.3.8 problem

开发者 https://www.devze.com 2023-01-06 18:37 出处:网络
I am running Ruby 1.9.1 & rails 2.3.8. Everything is installed fine as far as I can tell but when I run rake db:migrate I get this error:

I am running Ruby 1.9.1 & rails 2.3.8. Everything is installed fine as far as I can tell but when I run rake db:migrate I get this error:

Missing the Rails 2.3.8 gem. Please gem install -v=2.3.8 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installe开发者_运维百科d.

So I wanted to make sure I had rails installed and ran from the command line rails -v & it says Rails 2.3.8. So I am not sure what gives here. Can anyone point me in the right direction? thank you very much.


Well, if you really have those versions installed and you get the error, something may be wrong.

But, you can do as the message recommends and comment out the setting in your config/environment.rb so it tries to use whatever version you have installed.


Did you install rails with a different package manager? If I install rails with "sudo apt-get install rails" then "rails -v" uses the rails binary in /bin (even if it's 2.3.5 or 2.0.2) because that is first in my path. If after that I install rails with "sudo gem install rails -v=2.3.8" typing "rails -v" still gives me the version of the /bin rails. I haven't verified, but I would guess this is the same issue if you're using macports. If you uninstall the package you installed with the non rubygems package manger and then reinstall rails with rubygems that may fix your issue.

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消