ruby-on-rails – “bundle exec spring”不能与rbenv一起使用?
为什么不绑定exec
spring工作?
我已经调用bundle exec,并返回一个错误.我可以随时调用bundle exec. (这是可能的重复问题的解决方案). 我不会通过捆绑更新弹簧更新我的Gemfile或卸载一个版本的spring来使这项工作.我不应该被迫改变我的宝石安装. bundle binstubs弹簧也不工作. steve-air:finalcloud main$spring -v Spring version 1.3.5 steve-air:finalcloud main$bundle exec spring -v Spring version 1.3.4 steve-air:finalcloud main$bundle exec spring /Users/main/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:34:in `block in setup': You have already activated spring 1.3.5,but your Gemfile requires spring 1.3.4. Prepending `bundle exec` to your command may solve this. (Gem::LoadError) from /Users/main/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:19:in `setup' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler.rb:122:in `setup' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/setup.rb:8:in `<top (required)>' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.5/lib/spring/commands.rb:33:in `<module:Spring>' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.5/lib/spring/commands.rb:4:in `<top (required)>' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.5/lib/spring/server.rb:9:in `<top (required)>' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require' from /Users/main/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require' 要复制: 有Ruby安装rebenv. 解决方法
经过一番探索,似乎有几件事情在这里玩耍:
>系统安装宝石通过bundler安装宝石和特殊行为rails 这个问题的根本原因似乎是https://github.com/rails/spring/issues/295,固定在1.3.6.见:https://github.com/rails/spring/blob/master/CHANGELOG.md#136 可悲的是,事实证明,您无法解决这个问题,作者在问题中指定的限制. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |