简体   繁体   English

我的Ruby on Rails项目中没有gem文件,捆绑安装/更新不起作用?

[英]No gem file in my Ruby on Rails project, bundle install/update doesn't work?

I am working on a project in which Gemfile is not present. 我正在一个不存在Gemfile的项目中。 That project is working fine on production server having Apache with passenger. 该项目在具有Apache和乘客的生产服务器上运行良好。 But, Bundle install and bundle update does not work when I try try to start project in development environment. 但是,当我尝试在开发环境中启动项目时,捆绑安装和捆绑更新不起作用。 How to get that project working in development environment? 如何使该项目在开发环境中工作?

Unless someone from systems engineering can tell you, where the Gems were defined, You can reverse engineer a Gemfile from the contents of Gemfile.lock . 除非系统工程人员能告诉您Gems的定义位置,否则您可以从Gemfile.lock的内容对Gemfile.lock进行反向工程。

Or you can try to run your project by using this command, after you copied the Gemfile.lock from production, also put an empty Gemfile, as the bundler requires it. 或者,您可以尝试使用此命令运行项目,从生产环境中复制Gemfile.lock之后,还应按照捆绑程序的要求放置一个空的Gemfile。

bundle install --deployment 

see this answer , but sooner or later you will need the Gemfile. 看到这个答案 ,但是迟早您将需要Gemfile。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM