简体   繁体   English

告诉Rails应用程序加载/使用供应商中的gem,而不是默认的(/ usr / local /)

[英]Tell Rails application to load/use the gems in the vendor rather than the default (/usr/local/)

我已经vendorized我的应用程序gem vendorized给了vendor并希望我的应用程序使用存储在/vendor那些,但是每次启动该应用程序时,它都会从/usr/local加载,尽管bundle install --path /vendor 。所以我不知道是否有可能实现我想要的并使应用程序使用供应商中的gems而不是退出我的apps目录。

Using ruby gemset you can acheive this, 使用红宝石宝石镶嵌,您可以达到此目的,

rvm --create use $RUBY_VERSION@$GEMSET
rvm gemset list

You can find more details here 您可以在这里找到更多详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Rails不会从供应商/宝石加载宝石 - Rails does not load gems from vendor/gems 装有Rails 3的旅客3不会从供应商/ - Passenger 3 with Rails 3 doesn't load gems from vendor/ 如何使用供应商文件夹中的插件代替rails中的gem? - How to use the plugins within the vendor folder instead of the gems in rails? 使RVM还可以在供应商/宝石处加载宝石 - make RVM also load gems at vendor/gems Heroku/Rails 上的 Chromedriver:无法加载应用程序:Selenium::WebDriver::Error::WebDriverError:不是文件:“/usr/local/bin/chromedriver” - Chromedriver on Heroku/Rails: Unable to load application: Selenium::WebDriver::Error::WebDriverError: not a file: "/usr/local/bin/chromedriver" Rails-如何将供应商样式表和JavaScript加载到应用程序中? - Rails - How to load vendor stylesheets and javascripts into application? 在Rails中,什么是本地宝石? - In Rails, what are local gems? Rails捆绑选项,可将宝石重新带入本地应用程序 - Rails Bundle Options for Getting Gems back into your Local Application Rails 5 Engine-Gems依赖项,如何将它们加载到应用程序中? - Rails 5 Engine - Gems dependencies, how to load them into the application? 在Rails应用程序的Mina部署期间如何与本地gem一起使用捆绑软件? - How to use bundle with local gems during Mina deployment of Rails app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM