简体   繁体   English

执行“捆绑安装”后找不到 Gemfile

[英]Could not locate Gemfile after executing “bundle install”

Hey, I am completely new to Rails and just started created my first Project, following the Steps of a tutorial.嘿,我对 Rails 完全陌生,刚开始按照教程的步骤创建我的第一个项目。

I created the new Project using: rails myapp .我使用以下方法创建了新项目: rails myapp

Then I should execute bundle install , this did not work because bundler has not been installed, after an Update on Gems and installing bundler I have been able to execute bundle install , but every time I receive: Could not locate Gemfile然后我应该执行bundle install ,这不起作用,因为尚未安装 bundler,在更新 Gems 并安装 bundler 之后,我已经能够执行bundle install ,但每次我收到:无法找到 Gemfile

I checked my project dir, it is true there is no Gemfile, but should this be created automatically or not?我检查了我的项目目录,确实没有 Gemfile,但这是否应该自动创建?

Thanks in advance提前致谢

That depends on your version of rails.这取决于您的 Rails 版本。 Since you simply write rails myapp I assume you do not use Rails 3, where you would write rails new myapp .由于您只是编写rails myapp我假设您不使用 Rails 3,您将在其中编写rails new myapp In Rails 3, at least, the Gemfile is created for you automatically, and I would recommend using the latest version of Rails.至少在 Rails 3 中, Gemfile是自动为您创建的,我建议使用最新版本的 Rails。

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

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