简体   繁体   English

无法启动Rails Server,捆绑安装不起作用

[英]cannot start Rails Server, bundle install not working

I am on Rails 4.0.0 So, I have created a new app in a new directory: rails new lpd. 我在Rails 4.0.0上,因此,我在新目录中创建了一个新应用:rails new lpd。

I have cd' into the new lpd directory. 我已经进入新的lpd目录。

bundle install gives me Bundler::GemFileNotFound. 捆绑安装给了我Bundler :: GemFileNotFound。

rails s does not start the server. rails不会启动服务器。

I cd in to another project that has a Gemfile installed, do a bundle install, that works fine and the rails server starts fine. 我进入安装了Gemfile的另一个项目,进行捆绑安装,可以正常工作并且Rails服务器可以正常启动。

I cd back into my new project directory lpd and hit rails s again, no luck. 我回到我的新项目目录lpd并再次命中rails,没有运气。

still GemFileNotFound. 仍然是GemFileNotFound。

There is no Gemfile in the project directory. 项目目录中没有Gemfile。

You can: 您可以:

A. Create one yourself using a Rails 4.0 Gemfile as a template. A.使用Rails 4.0 Gemfile作为模板创建自己。

B. Copy one over from another Rails 4.0 project. B.从另一个Rails 4.0项目复制一个。

C. Run rails new again to recreate the project files (be careful to backup any changes you have already made such as configuration changes). C.再次运行rails new以重新创建项目文件(请小心备份您已进行的所有更改,例如配置更改)。

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

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