2012-07-31 17 views
-1

我需要安裝ruby 1.8.7和rails 2.3.4,因爲我需要修改一箇舊的應用程序。 (最新的Ruby和RVM寶石爲我工作很好,但我需要用這個老寶石和紅寶石) //乳寧的Ubuntu 12.04RVM安裝紅寶石1.8.7和導軌2.3.4找不到在這臺機器上可用的gem中的gem'rails(= 1.8.7)ruby'。 (Bundler :: GemNotFound)

問題是,當我嘗試運行耙寶石:安裝 (我不能做rails新應用也)

我不能解決這個問題,我沒有太多時間。 在此先感謝您的幫助。

$ RVM使用1.8.7 使用/home/user/.rvm/gems/ruby-1.8.7-p370

$ RVM寶石使用gemset234 使用Ruby-1.8.7-P370與寶石gemset234

$寶石列表

*當地的寶石*

的ActionMailer(2.3.4) ActionPack的(2.3.4) 活躍記錄(2.3.4) 的ActiveResource(2.3.4) 的ActiveSupport(2.3.4) 打捆(1.1.5,0.9.1) 架(1.0.1) 導軌(2.3.4) 耙(0.9。 2.2,0.8.7) RubyGems的打捆(1.0.3) RubyGems的更新(1.8.24) RVM(1.11.3.5)

$耙寶石:安裝

/home/user/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'rails (= 1.8.7) ruby' in the gems available on this machine. (Bundler::GemNotFound) 
    from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/resolver.rb:161:in `start' 
    from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/resolver.rb:128:in `resolve' 
    from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/resolver.rb:127:in `catch' 
    from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/resolver.rb:127:in `resolve' 
    from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/definition.rb:192:in `resolve' 
    from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs' 
    from /home/user/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/environment.rb:27:in `specs' 
    from /home/user/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in `candidate?' 
    from /home/user/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:60:in `setup' 
    from /home/user/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:75 
    from /home/user/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `gem_original_require' 
    from /home/user/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `require' 
    from /home/user/.rvm/gems/[email protected]/bin/ruby_noexec_wrapper:9 

回答

1

這是一個缺點是導軌中的寶石安裝系統2.如果有耙子運行所需的依賴性,例如這種情況下的導軌,則需要安裝手動。在最後運行rake之前,請爲每個這些依賴安裝gem。

+0

謝謝你的迴應。我試過'gem install rails',但仍然有相同的錯誤。當我嘗試做耙寶石時仍然無法找到gem'rails(= 1.8.7)ruby':安裝 – halitsch 2012-07-31 10:18:21

+0

難題,沒有Rails v。1.8.7。從'config/application.rb' /'config/environment.rb'中移除違規行。它們可能意味着Ruby 1.8.7,它不應該用'config.gem'指定。 – 2012-07-31 14:56:06

相關問題