无法从 ubuntu 升级 9.10 运行脚本/控制台 -> 10.04
我刚刚将我的ubuntu从9.10升级到10.04, 升级前一切都好,升级后就不行了 运行时间更长的脚本/控制台。
Loading development environment (Rails 2.3.10)
/usr/local/lib/site_ruby/1.9.1/rubygems.rb:779:in
`report_activate_error':Gem::LoadError: RubyGem version error:
rails(2.3.4 not = 2.3.10)
/usr/lib/ruby/1.9.1/irb/init.rb:264:in `require':LoadError: no such file
to load -- console_app
/usr/lib/ruby/1.9.1/irb/init.rb:264:in `require':LoadError: no such file
to load -- console_with_helpers
# gem -v
1.5.2
# ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
# rails -v
Rails 2.3.10
到目前为止,谷歌没有多大帮助:(
更新: 尝试了几个选项后,我更新到 10.10,现在出现以下错误,
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
$ gem -v
1.6.2
$ rails -v
Rails 2.3.10
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.6.2
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /home/recmend/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
$ whereis ruby
ruby: /usr/bin/ruby1.8 /usr/bin/ruby /usr/lib/ruby /usr/local/bin/ruby /usr/local/lib/ruby /usr/share/man/man1/ruby.1.gz
$ whereis gem
gem: /usr/bin/gem /usr/local/bin/gem
$ script/console
Loading development environment (Rails 2.3.10)
/usr/local/lib/site_ruby/1.9.1/rubygems/source_index.rb:68:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/source_index.rb:58:in `from_installed_gems'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:883:in `source_index'
请转到下一个问题...
I just upgraded my ubuntu from 9.10 to 10.04,
before the upgrade everything was fine, but after the upgrade I can no
longer run script/console.
Loading development environment (Rails 2.3.10)
/usr/local/lib/site_ruby/1.9.1/rubygems.rb:779:in
`report_activate_error':Gem::LoadError: RubyGem version error:
rails(2.3.4 not = 2.3.10)
/usr/lib/ruby/1.9.1/irb/init.rb:264:in `require':LoadError: no such file
to load -- console_app
/usr/lib/ruby/1.9.1/irb/init.rb:264:in `require':LoadError: no such file
to load -- console_with_helpers
# gem -v
1.5.2
# ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
# rails -v
Rails 2.3.10
Google was not much help so far :(
Update:
After trying several options, I updated to 10.10 and now getting following errors
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
$ gem -v
1.6.2
$ rails -v
Rails 2.3.10
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.6.2
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /home/recmend/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
$ whereis ruby
ruby: /usr/bin/ruby1.8 /usr/bin/ruby /usr/lib/ruby /usr/local/bin/ruby /usr/local/lib/ruby /usr/share/man/man1/ruby.1.gz
$ whereis gem
gem: /usr/bin/gem /usr/local/bin/gem
$ script/console
Loading development environment (Rails 2.3.10)
/usr/local/lib/site_ruby/1.9.1/rubygems/source_index.rb:68:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/source_index.rb:58:in `from_installed_gems'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:883:in `source_index'
Off to next problem...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题出在您的 Rubies 版本中。你看:
但是
加载开发环境 (Rails 2.3.10) /usr/local/lib/site_ruby/1.9.1/rubygems.rb:779:in
它正在尝试加载 1.9.1 及其所有 gem。
你可以在这里做什么。
which ruby
将返回您的 Ruby 1.9.2 目录,export PATH=/your/ruby1.9.2/dir/bin:$PATH
享受吧:)
the problem is in your Rubies versions. You see:
but
Loading development environment (Rails 2.3.10) /usr/local/lib/site_ruby/1.9.1/rubygems.rb:779:in
It is trying to load 1.9.1 with all its gems.
What you can do here.
which ruby
will return your Ruby 1.9.2 direxport PATH=/your/ruby1.9.2/dir/bin:$PATH
enjoy :)