问题描述
我正在研究一个大学项目,我的老师为它设置了服务器,但是在安装Ruby 1.9.x之后,我们必须返回到Ruby 1.8.x,因为Ruby 1.9 / Rails 2.3.4的问题。
现在,每次构建Rails应用程序时,它总是使用Rails 2.2.3 gem。
I已经改变了environment.rb(RAILS_GEM_VERSION ='2.3.4'...),但它不工作。
老师给我看了ruby env输出,看起来像是指向Ruby 1.8文件夹。
Welcome aboard页面显示:
gem list输出是:
mysql gem ,但我认为这表明它没有必要或已被弃用,但mysql正在运行。
任何人都知道可能会导致Rails 2.3.4 gem无法正常工作的问题?
p>
也许你已经安装了多个版本的ruby 1.8?运行这些命令:
哪个ruby
哪个宝石
ruby -v
gem env
确保gem使用的ruby版本与您在命令行上使用的ruby版本相同。
I'm working on a university project and my teacher set up the server for it, but after installing Ruby 1.9.x we had to return to Ruby 1.8.x, because of the Ruby 1.9/Rails 2.3.4 problem.
Now, every time I build a Rails app, it's always using Rails 2.2.3 gems.
I've changed the environment.rb (RAILS_GEM_VERSION = '2.3.4' ...), but it's not working.
The teacher show me "ruby env" output and looks like it's point to Ruby 1.8 folders.
The "Welcome aboard" page is showing:
The "gem list" output is:
Also, the teacher installed the mysql gem but I think it showed that it wasn't necessary or was deprecated, but the mysql is working.
Anyone knows what could be problem for not getting Rails 2.3.4 gems to work?
Thanks
Maybe you have multiple versions of ruby 1.8 installed? Run these commands:
which ruby
which gem
ruby -v
gem env
Make sure the ruby version being used by gem is the same as you are using on the command-line.
这篇关于无法使用更新的宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!