2012-04-03 25 views
1

當克隆我的存儲庫時,它從我開發的目錄中運行,我收到一個錯誤。奇怪的部分是它使用相同版本的Ruby和相同的Gemset,但我覺得這個錯誤仍然來自Gems的錯誤。任何人都有一個想法是什麼可能導致它?有我的寶石:`assert_index':之前沒有插入這樣的中間件:「Rack :: Sendfile」

source 'https://rubygems.org' 

gem 'rails', '3.2.2' 
gem 'mysql2' 
gem 'activeadmin' 

group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 
    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

的錯誤如下:

eml/orchid → master rails s 
=> Booting WEBrick 
=> Rails 3.2.2 application starting in development on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
Exiting 
/Users/eml/.rvm/gems/[email protected]/gems/actionpack-3.2.2/lib/action_dispatch/middleware/stack.rb:120:in `assert_index': No such middleware to insert before: "Rack::Sendfile" (RuntimeError) 
    from /Users/eml/.rvm/gems/[email protected]/gems/actionpack-3.2.2/lib/action_dispatch/middleware/stack.rb:83:in `insert' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/configuration.rb:38:in `block in merge_into' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/configuration.rb:37:in `each' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/configuration.rb:37:in `merge_into' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/engine.rb:469:in `app' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `instance_exec' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `run' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/initializable.rb:55:in `block in run_initializers' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `each' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `run_initializers' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/application.rb:136:in `initialize!' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in `method_missing' 
    from /Users/eml/Projects/orchid/orchid/config/environment.rb:5:in `<top (required)>' 
    from /Users/eml/.rvm/gems/[email protected]/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require' 
    from /Users/eml/.rvm/gems/[email protected]/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require' 
    from /Users/eml/.rvm/gems/[email protected]/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency' 
    from /Users/eml/.rvm/gems/[email protected]/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require' 
    from /Users/eml/Projects/orchid/orchid/config.ru:4:in `block in <main>' 
    from /Users/eml/.rvm/gems/[email protected]/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval' 
    from /Users/eml/.rvm/gems/[email protected]/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize' 
    from /Users/eml/Projects/orchid/orchid/config.ru:1:in `new' 
    from /Users/eml/Projects/orchid/orchid/config.ru:1:in `<main>' 
    from /Users/eml/.rvm/gems/[email protected]/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval' 
    from /Users/eml/.rvm/gems/[email protected]/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file' 
    from /Users/eml/.rvm/gems/[email protected]/gems/rack-1.4.1/lib/rack/server.rb:200:in `app' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/commands/server.rb:46:in `app' 
    from /Users/eml/.rvm/gems/[email protected]/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app' 
    from /Users/eml/.rvm/gems/[email protected]/gems/rack-1.4.1/lib/rack/server.rb:252:in `start' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/commands/server.rb:70:in `start' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/commands.rb:55:in `block in <top (required)>' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap' 
    from /Users/eml/.rvm/gems/[email protected]/gems/railties-3.2.2/lib/rails/commands.rb:50:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

謝謝!

UPDATE:搞砸了,所以沒有它不起作用的初始目錄。絕對與某些寶石有關。

UPDATE2:通過RVM創建一個新的寶石和跑捆綁安裝,這裏的寶石的破敗和安裝在他們的版本:

eml/LampPostDb → master rvm --rvmrc --create [email protected] 
eml/LampPostDb → master bundle install 
Fetching source index for https://rubygems.org/ 
Installing rake (0.9.2.2) 
Installing i18n (0.6.0) 
Installing multi_json (1.1.0) 
Installing activesupport (3.2.2) 
Installing builder (3.0.0) 
Installing activemodel (3.2.2) 
Installing erubis (2.7.0) 
Installing journey (1.0.3) 
Installing rack (1.4.1) 
Installing rack-cache (1.2) 
Installing rack-test (0.6.1) 
Installing hike (1.2.1) 
Installing tilt (1.3.3) 
Installing sprockets (2.1.2) 
Installing actionpack (3.2.2) 
Installing mime-types (1.18) 
Installing polyglot (0.3.3) 
Installing treetop (1.4.10) 
Installing mail (2.4.4) 
Installing actionmailer (3.2.2) 
Installing sass (3.1.15) 
Installing bourbon (1.4.0) 
Installing bcrypt-ruby (3.0.1) with native extensions 
Installing orm_adapter (0.0.6) 
Installing rack-ssl (1.3.2) 
Installing json (1.6.5) with native extensions 
Installing rdoc (3.12) 
Installing thor (0.14.6) 
Installing railties (3.2.2) 
Installing warden (1.1.1) 
Installing devise (2.0.4) 
Installing fastercsv (1.5.4) 
Installing formtastic (2.1.1) 
Installing has_scope (0.5.1) 
Installing responders (0.9.0) 
Installing inherited_resources (1.3.1) 
Installing jquery-rails (2.0.1) 
Installing kaminari (0.13.0) 
Installing arel (3.0.2) 
Installing tzinfo (0.3.32) 
Installing activerecord (3.2.2) 
Installing polyamorous (0.5.0) 
Installing meta_search (1.1.3) 
Installing activeresource (3.2.2) 
Using bundler (1.0.21) 
Installing rails (3.2.2) 
Installing activeadmin (0.4.3) 
Installing coffee-script-source (1.2.0) 
Installing execjs (1.3.0) 
Installing coffee-script (2.2.0) 
Installing coffee-rails (3.2.2) 
Installing mysql2 (0.3.11) with native extensions 
Installing sass-rails (3.2.5) 
Installing uglifier (1.2.3) 

回答

6

當然我找到罪魁禍首問這個問題了。最初我有had found an issue on Github describing a simlar problem,但我沒有compass.rb初始值設定項。我沒有弄清楚的是,我有一個sass.rb初始值設定項,它包含幾乎相同的代碼行。

我不完全確定是否評論這整個文件是好的,或者如果它會導致一堆問題。該應用現在開始正常,但未來只能告訴。

如果有人有比這更好的答案,我會高興地將他們標記爲正確的。

相關問題