2012-08-26 88 views
2

我搜索了所有網頁,但一直未能找到此錯誤的解決方案。每次我試圖啓動導軌服務器,或者甚至導軌控制檯時,我都會得到crack/xml (LoadError)。任何人有任何建議,他們認爲可能會幫助我正確導入和運行?無法啓動Rails服務器或控制檯 - (crack/xml)LoadError

Construct Coverage: rails s 
/Users/Construct/.rvm/gems/[email protected]/gems/ap-0.1.1/lib/ap.rb:2:in `require': cannot load such file -- crack/xml (LoadError) 
    from /Users/Construct/.rvm/gems/[email protected]/gems/ap-0.1.1/lib/ap.rb:2:in `<top (required)>' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `require' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/runtime.rb:68:in `block (2 levels) in require' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `each' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/runtime.rb:66:in `block in require' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `each' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `require' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler.rb:119:in `require' 
    from /Users/Construct/Dropbox/rails_projects/Coverage/config/application.rb:7:in `<top (required)>' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/railties-3.2.1/lib/rails/commands.rb:53:in `require' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/railties-3.2.1/lib/rails/commands.rb:53:in `block in <top (required)>' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap' 
    from /Users/Construct/.rvm/gems/[email protected]/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

我已經嘗試安裝破解寶石然後運行捆綁,但我還是給了同樣的錯誤,甚至終端的重新啓動後。所以我不確定如何解決這種情況。

回答

4

可以肯定的是:錯誤源於ap gem,this line

它使用了crack/xml作爲依賴關係,但它沒有被聲明爲gemfile中的依賴關係子連接器無法知道它應該被添加。

如何解決?

  • 添加寶石crack在你的Gemfile中,ap寶石

  • 之前或更改AP寶石源代碼

+0

非常感謝sooooooo。 「在你的gem文件中添加gem crack,完全解決了我的問題。雖然我的確嘗試編輯ap gem源代碼,並將crack添加爲依賴項,儘管它似乎沒有任何好處。 –

+0

似乎'ap'寶石已經過時了 - 請參閱另一個建議'awesome_print'寶石的答案。 – Purplejacket

4

我得到了@apneadiving解決方案正常工作。

我也試圖與

gem 'awesome_print' 
在Gemfile中

更換

gem 'ap' 

這似乎也工作。

更新: 似乎ap可能是awesome_print gem的html/xml版本。