ruby-on-rails – 即使使用bundle exec,“你已经激活了”消息
发布时间:2020-12-17 02:04:53 所属栏目:百科 来源:网络整理
导读:我正在我的Gemfile中在共享路径中安装gems,正如Capistrano默认执行的那样,当我运行时: bundle exec rake assets:precompile RAILS_ENV=production 我明白了: You have already activated rake 0.9.2.2,but your Gemfile requires rake 10.0.4. Using bundl
我正在我的Gemfile中在共享路径中安装gems,正如Capistrano默认执行的那样,当我运行时:
bundle exec rake assets:precompile RAILS_ENV=production 我明白了: You have already activated rake 0.9.2.2,but your Gemfile requires rake 10.0.4. Using bundle exec may solve this. 看到: cat Gemfile.lock | grep rake 收益: rake (>= 0.8.7) rake (10.0.4) 这是我的宝石环境输出: - RUBYGEMS VERSION: 1.8.24 - RUBY VERSION: 1.9.3 (2013-06-27 patchlevel 448) [x86_64-linux] - INSTALLATION DIRECTORY: /home/bitnami/my_app/shared/bundle/ruby/1.9.1/ - RUBY EXECUTABLE: /opt/bitnami/ruby/bin/ruby - EXECUTABLE DIRECTORY: /home/bitnami/my_app/shared/bundle/ruby/1.9.1/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-linux - GEM PATHS: - /home/bitnami/my_app/shared/bundle/ruby/1.9.1/ - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - "gemhome" => "/home/bitnami/my_app/shared/bundle/ruby/1.9.1/" - "gempath" => ["/home/bitnami/my_app/shared/bundle/ruby/1.9.1/"] - REMOTE SOURCES: - http://rubygems.org/ 更新 which -a rake /opt/bitnami/rvm/bin/rake /opt/bitnami/ruby/bin/rake 更新2 我试着给耙子提供完整的路径,但同样的问题 更新3 重新安装RVM后 * WARNING: Found gemhome in /home/bitnami/.gemrc,please remove it,as it will break rubygems in RVM. * WARNING: Found gempath in /home/bitnami/.gemrc,as it will break rubygems in RVM. If it is intended or a mistake 'export rvm_ignore_gemrc_issues=1' to avoid this warning. 我现在应该怎么做?我在那里添加了gem_home因为我希望将我的宝石安装在我想要的目录中,不确定这是否正确. 解决方法
你需要按照说明操作,如果安装程序告知有不兼容的设置,那么你需要清除它们,通常这应该做得很好:
rm -f ~/.gemrc 一个常见的解决方案是禁用文档(服务器上不需要,而且很多用户无论如何都在本地使用它们): echo 'gem: --no-ri --no-rdoc' > ~/.gemrc 两者都将摆脱强制gemhome / gempath的旧?/ .gemrc – 这是必需的,因为这些变量通过环境变量GEM_HOME / GEM_PATH与RVM控制. 在?/ .gemrc修复后运行: rvm use 1.9.3 --default --install 它将确保安装ruby,设置为默认值并正确加载到当前环境中. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |