2012-06-30 35 views
0

我剛開始一個新的應用程序,但是當我點擊歡迎你乘坐頁「你的應用程序的環境」鏈接正在此錯誤。錯誤上啓動應用程序的捆紮機:: GemNotFound

Error starting application Your Rack app raised an exception when Pow tried to run it.

Bundler::GemNotFound: Could not find activesupport-3.2.6 in any of the sources

我的應用程序正在運行:

  • 的Rails 3.2.6
  • 紅寶石1.9.3p194
  • 的RubyGems 1.8.24
  • RVM 1.14.5
  • POW 0.4.0

I F在類似的問題中,問題是如何使用乘客,但我沒有使用它。

當我運行的寶石列表,我得到:

* LOCAL GEMS *

actionmailer (3.2.6) actionpack (3.2.6) activemodel (3.2.6) activerecord (3.2.6) activeresource (3.2.6) activesupport (3.2.6) arel (3.0.2) builder (3.0.0) bundler (1.1.4) coffee-rails (3.2.2) coffee-script (2.2.0) coffee-script-source (1.3.3) daemon_controller (1.0.0) erubis (2.7.0) execjs (1.4.0) fastthread (1.0.7) hike (1.2.1) i18n (0.6.0) journey (1.0.4) jquery-rails (2.0.2) json (1.7.3) mail (2.4.4) mime-types (1.19) multi_json (1.3.6) passenger (3.0.13) polyglot (0.3.3) rack (1.4.1) rack-cache (1.2) rack-ssl (1.3.2) rack-test (0.6.1) rails (3.2.6) railties (3.2.6) rake (0.9.2.2) rdoc (3.12) rubygems-bundler (1.0.3) rvm (1.11.3.4) sass (3.1.20) sass-rails (3.2.5) sprockets (2.4.3, 2.1.3) sqlite3 (1.3.6) thor (0.15.4, 0.15.3) tilt (1.3.3) treetop (1.4.10) tzinfo (0.3.33) uglifier (1.2.6)

任何幫助將不勝感激,謝謝。

更新

source 'https://rubygems.org' 

gem 'rails', '3.2.6' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3' 


# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 
    # gem 'therubyracer', :platforms => :ruby 

    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

# To use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'debugger' 

Gemfile.lock的

GEM 
    remote: https://rubygems.org/ 
    specs: 
    actionmailer (3.2.6) 
     actionpack (= 3.2.6) 
     mail (~> 2.4.4) 
    actionpack (3.2.6) 
     activemodel (= 3.2.6) 
     activesupport (= 3.2.6) 
     builder (~> 3.0.0) 
     erubis (~> 2.7.0) 
     journey (~> 1.0.1) 
     rack (~> 1.4.0) 
     rack-cache (~> 1.2) 
     rack-test (~> 0.6.1) 
     sprockets (~> 2.1.3) 
    activemodel (3.2.6) 
     activesupport (= 3.2.6) 
     builder (~> 3.0.0) 
    activerecord (3.2.6) 
     activemodel (= 3.2.6) 
     activesupport (= 3.2.6) 
     arel (~> 3.0.2) 
     tzinfo (~> 0.3.29) 
    activeresource (3.2.6) 
     activemodel (= 3.2.6) 
     activesupport (= 3.2.6) 
    activesupport (3.2.6) 
     i18n (~> 0.6) 
     multi_json (~> 1.0) 
    arel (3.0.2) 
    builder (3.0.0) 
    coffee-rails (3.2.2) 
     coffee-script (>= 2.2.0) 
     railties (~> 3.2.0) 
    coffee-script (2.2.0) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.3.3) 
    erubis (2.7.0) 
    execjs (1.4.0) 
     multi_json (~> 1.0) 
    hike (1.2.1) 
    i18n (0.6.0) 
    journey (1.0.4) 
    jquery-rails (2.0.2) 
     railties (>= 3.2.0, < 5.0) 
     thor (~> 0.14) 
    json (1.7.3) 
    mail (2.4.4) 
     i18n (>= 0.4.0) 
     mime-types (~> 1.16) 
     treetop (~> 1.4.8) 
    mime-types (1.19) 
    multi_json (1.3.6) 
    polyglot (0.3.3) 
    rack (1.4.1) 
    rack-cache (1.2) 
     rack (>= 0.4) 
    rack-ssl (1.3.2) 
     rack 
    rack-test (0.6.1) 
     rack (>= 1.0) 
    rails (3.2.6) 
     actionmailer (= 3.2.6) 
     actionpack (= 3.2.6) 
     activerecord (= 3.2.6) 
     activeresource (= 3.2.6) 
     activesupport (= 3.2.6) 
     bundler (~> 1.0) 
     railties (= 3.2.6) 
    railties (3.2.6) 
     actionpack (= 3.2.6) 
     activesupport (= 3.2.6) 
     rack-ssl (~> 1.3.2) 
     rake (>= 0.8.7) 
     rdoc (~> 3.4) 
     thor (>= 0.14.6, < 2.0) 
    rake (0.9.2.2) 
    rdoc (3.12) 
     json (~> 1.4) 
    sass (3.1.20) 
    sass-rails (3.2.5) 
     railties (~> 3.2.0) 
     sass (>= 3.1.10) 
     tilt (~> 1.3) 
    sprockets (2.1.3) 
     hike (~> 1.2) 
     rack (~> 1.0) 
     tilt (~> 1.1, != 1.3.0) 
    sqlite3 (1.3.6) 
    thor (0.15.4) 
    tilt (1.3.3) 
    treetop (1.4.10) 
     polyglot 
     polyglot (>= 0.3.1) 
    tzinfo (0.3.33) 
    uglifier (1.2.6) 
     execjs (>= 0.3.0) 
     multi_json (~> 1.3) 

PLATFORMS 
    ruby 

DEPENDENCIES 
    coffee-rails (~> 3.2.1) 
    jquery-rails 
    rails (= 3.2.6) 
    sass-rails (~> 3.2.3) 
    sqlite3 
    uglifier (>= 1.0.3) 

我已經運行捆綁安裝的完成罰款。但是,如果我運行sudo的包安裝,我得到:

/Users/dave/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError) 
    from /Users/dave/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec' 
    from /Users/dave/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem' 
    from /Users/dave/.rvm/gems/[email protected]/bin/bundle:18:in `<main>' 
    from /Users/dave/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval' 
    from /Users/dave/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>' 

回答

6

戰俘可能正試圖用「捆綁EXEC」前綴開始您的應用程序。這意味着你的應用只能看到Gemfile中的gem(更確切地說,只有當前環境中的gem)。

這是偉大的,因爲它使您能夠使用不同版本的同一寶石多個應用程序:您可能必須使用Rails 2和使用Rails 3另一個應用程序,兩者都安裝在系統上,但你的第一個應用說它依賴於其Gemfile中的Rails 2,另一個將Rails 3指定爲依賴項。

長話短說:您必須聲明每個在Gemfile中並運行依賴訪問你的應用程序之前,「包安裝」。

還有一個建議:不要忘記指定耙的版本,甚至打捆使用,當你升級你的開發系統上的寶石,但不是你的督促服務器

+0

感謝您的迴應,您是如何聲明依賴關係的?我已經將我的gemfile添加到了我的問題中。它被宣佈爲寶石'鐵軌','3.2.6'? – Dave

+1

您的Gemfile似乎沒問題,您是否運行軟件包安裝?你可以發佈你的Gemfile.lock? – systho

+0

我已經添加了鎖定文件。 – Dave

1

我就可能挽救你的生命同樣的錯誤:通過以下命令解決:

rvm use ruby-version 

gem install rails 
相關問題