2014-10-12 46 views
2

我的Rails控制台停止工作:Rails的控制台不工作(寻找错误的宝石)

$ rails c 
Could not find rake-10.2.2 in any of the sources 
Run `bundle install` to install missing gems. 

你以为运行bundle installbundle update会的工作,但没了!令我感到困惑的是我没有使用rake 10.2.2,它不在gemfile.lock中。我正在使用耙10.3.2

通过bundle exec rails console RAILS_ENV=development运行返回相同的错误。

正在尝试gem install rake -v 10.2.2只有轻微改善的情况。现在它正在寻找我不使用的不同宝石:

$ rails c 
Could not find i18n-0.6.9 in any of the sources 
Run `bundle install` to install missing gems. 

再次...捆绑安装就好了。 Odder仍然,rails s工作正常,耙子任务都很好。我只是不能使用控制台!

$ bundle install 
Using rake 10.3.2 
Using i18n 0.6.11 
Using json 1.8.1 
Using minitest 5.4.2 
Using thread_safe 0.3.4 
Using tzinfo 1.2.2 
Using activesupport 4.1.6 
Using builder 3.2.2 
Using erubis 2.7.0 
Using actionview 4.1.6 
Using rack 1.5.2 
Using rack-test 0.6.2 
Using actionpack 4.1.6 
Using mime-types 2.3 
Using mail 2.6.1 
Using actionmailer 4.1.6 
Using arbre 1.0.2 
Using sass 3.2.19 
Using thor 0.19.1 
Using bourbon 3.2.3 
Using coffee-script-source 1.8.0 
Using execjs 2.2.1 
Using coffee-script 2.3.0 
Using railties 4.1.6 
Using coffee-rails 4.0.1 
Using formtastic 3.0.0 
Using has_scope 0.6.0.rc 
Using responders 1.0.0 
Using inherited_resources 1.4.1 
Using jquery-rails 3.1.2 
Using jquery-ui-rails 5.0.0 
Using kaminari 0.16.1 
Using activemodel 4.1.6 
Using arel 5.0.1.20140414130214 
Using activerecord 4.1.6 
Using bundler 1.7.3 
Using hike 1.2.3 
Using multi_json 1.10.1 
Using tilt 1.4.1 
Using sprockets 2.11.0 
Using sprockets-rails 2.1.4 
Using rails 4.1.6 
Using polyamorous 1.1.0 
Using ransack 1.4.1 
Using sass-rails 4.0.3 
Using activeadmin 1.0.0.pre from git://github.com/activeadmin/activeadmin.git (at master) 
Using addressable 2.3.6 
Using bcrypt 3.1.7 
Using bootstrap-sass 3.2.0.2 
Using mini_portile 0.6.0 
Using nokogiri 1.6.3.1 
Using xpath 2.0.0 
Using capybara 2.4.3 
Using timers 1.1.0 
Using celluloid 0.15.2 
Using coderay 1.1.0 
Using database_cleaner 1.3.0 
Using orm_adapter 0.5.0 
Using warden 1.2.3 
Using devise 3.3.0 
Using diff-lcs 1.2.5 
Using launchy 2.4.2 
Using email_spec 1.6.0 
Using excon 0.39.6 
Using factory_girl 4.4.0 
Using factory_girl_rails 4.4.1 
Using ffi 1.9.5 
Using figaro 1.0.0 
Using formatador 0.2.5 
Using friendly_id 5.0.4 
Using multi_xml 0.5.5 
Using httparty 0.13.1 
Using gibbon 1.0.4 
Using rb-fsevent 0.9.4 
Using rb-inotify 0.9.5 
Using listen 2.7.11 
Using lumberjack 1.0.9 
Using method_source 0.8.2 
Using slop 3.6.0 
Using pry 0.10.1 
Using guard 2.6.1 
Using rspec-support 3.1.1 
Using rspec-core 3.1.4 
Using rspec-expectations 3.1.2 
Using rspec-mocks 3.1.2 
Using rspec 3.1.0 
Using guard-rspec 4.3.1 
Using haml 4.0.5 
Using haml-rails 0.5.3 
Using heroku-api 0.3.19 
Using heroku_san 4.3.2 
Using jbuilder 1.5.3 
Using turbolinks 2.3.0 
Using jquery-turbolinks 2.1.0 
Using netrc 0.7.7 
Using newrelic_rpm 3.9.4.245 
Using pg 0.17.0 
Using rails_serve_static_assets 0.0.2 
Using rails_stdout_logging 0.0.3 
Using rails_12factor 0.0.2 
Using recaptcha 0.3.6 
Using rest-client 1.7.2 
Using rspec-rails 3.1.0 
Using shoulda-matchers 2.7.0 from git://github.com/thoughtbot/shoulda-matchers.git (at master) 
Using spring 1.1.3 
Using spring-commands-rspec 1.0.2 
Using sqlite3 1.3.8 
Using streak_client 0.0.0 from git://github.com/yetanothernguyen/streak_client.git (at master) 
Using sucker_punch 1.2.1 
Using uglifier 2.5.3 
Your bundle is complete! 
Use `bundle show [gemname]` to see where a bundled gem is installed. 
+0

运行'bundle exec rails c' – rossta 2014-10-12 11:25:48

+0

同样的事情。寻找耙10.2.2 – TLK 2014-10-13 16:47:59

+0

我一直有相同的错误,重新安装gemset,停止春天,没有任何工作。看起来像'春天'没有使用/找到捆绑。我最终从我的'Gemfile'中删除了'gem'spring'',现在它可以工作。也许不理想,但它的作品:) – nathanvda 2014-10-27 12:35:58

回答

5

答案通过Twitter向我建议的工作:

步骤1)删除宝石并重新安装

这并没有让我跑,但它在至少有控制台与正确的gemset对话。但控制台仍悬挂着。

中断控制台显示弹簧错误。

这个问题,建议我停止春天:ruby on rails console hanging when loading

bin/spring stop 

一切工作!

+0

只运行'bin/spring stop'为我工作。 – robertjewell 2018-01-09 22:00:08

-1

运行此

bundle exec rails console RAILS_ENV=development 
+0

这个答案可以通过其他细节或评论来改善。运行这个命令到底会做什么?提问者试图提出什么问题? – ArtOfWarfare 2014-10-12 20:13:35

+0

同样的事情....试图寻找耙10.2.2 – TLK 2014-10-13 16:48:29