2012-11-05 78 views
3

使用Ruby version1.9.3p286和Rails 3.2.8無法運行此開源項目http://railsapps.github.com/tutorial-rails-bootstrap-devise-cancan.html.I。 我已經安裝了所有的寶石成功,但試圖從RubyMine的輸出 運行時執行以下操作:使用CanCan和Twitter引導的Rails教程引導

/Users/st/.rvm/rubies/ruby-1.9.3-p286/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/st/projects/rails3-bootstrap-devise-cancan/script/rails server -b 0.0.0.0 -p 3000 -e development 
/Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find diff-lcs-1.1.3 in any of the sources (Bundler::GemNotFound) 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `map!' 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `materialize' 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs' 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:158:in `specs_for' 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:147:in `requested_specs' 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/environment.rb:23:in `requested_specs' 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/runtime.rb:11:in `setup' 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler.rb:116:in `setup' 
    from /Users/st/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/setup.rb:17:in `<top (required)>' 
    from /Users/st/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require' 
    from /Users/st/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require' 
    from /Users/st/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require' 
    from /Users/st/projects/rails3-bootstrap-devise-cancan/config/boot.rb:6:in `<top (required)>' 
    from /Users/st/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /Users/st/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /Users/st/projects/rails3-bootstrap-devise-cancan/script/rails:5:in `<top (required)>' 
    from -e:1:in `load' 
    from -e:1:in `<main>' 
Process finished with exit code 1 

我的Gemfile:

source 'https://rubygems.org' 
gem 'rails', '3.2.8' 
gem 'sqlite3' 
group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 
    gem 'uglifier', '>= 1.0.3' 
end 
gem 'jquery-rails' 
gem "rspec-rails", ">= 2.11.0", :group => [:development, :test] 
gem "email_spec", ">= 1.2.1", :group => :test 
gem "cucumber-rails", ">= 1.3.0", :group => :test, :require => false 
gem "database_cleaner", ">= 0.8.0", :group => :test 
gem "launchy", ">= 2.1.2", :group => :test 
gem "capybara", ">= 1.1.2", :group => :test 
gem "factory_girl_rails", ">= 4.1.0", :group => [:development, :test] 
gem "bootstrap-sass", ">= 2.1.0.0" 
gem "devise", ">= 2.1.2" 
gem "cancan", ">= 1.6.8" 
gem "rolify", ">= 3.2.0" 
gem "simple_form", ">= 2.0.3" 
gem "quiet_assets", ">= 1.0.1", :group => :development 

回答

2

一點除了@狒狒的解決方案,嘗試刪除Gem.lock文件並再次運行bundle install

如何過,一旦你是舒服本例中,您可能會感興趣​​生成您的軌道骨架

HTH

+0

試圖刪除gem.lock文件並運行軟件包安裝,但它無法幫助我,謝謝你的作曲家! –

+0

來自@ sameera207的好建議。使用Rails Composer來生成應用程序。並從作者的安裝Rails閱讀本文:http://railsapps.github.com/installing-rails.html –

3

它找不到diff-lcs-1.1.3寶石,嘗試運行包手動安裝或安裝寶石。

編輯:看到你的寶石文件,它缺少

gem "diff-lcs", "1.1.3" 
+0

我手動嘗試,但所有的t他一樣。 –

+0

添加了gem「diff-lcs」,「1.1.3」,但現在RubyMine打印在任何源代碼中找不到multi_json-1.3.6(Bundler :: GemNotFound) –

+0

也添加了那一個,其他任何可能會抱怨關於。 –