Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 无法在新Rails应用程序中捆绑安装_Ruby On Rails - Fatal编程技术网

Ruby on rails 无法在新Rails应用程序中捆绑安装

Ruby on rails 无法在新Rails应用程序中捆绑安装,ruby-on-rails,Ruby On Rails,我正在尝试制作一个Rails应用程序,但它无法安装所需的gems。我得到的错误是: 部署设置需要Gemfile.lock。请确保你有 部署前已将Gemfile.lock检查到版本控制中 我试着在没有部署标志的情况下运行它,但这并没有帮助。有什么想法吗?我通过尝试从另一个项目复制gemfile.lock文件解决了这个问题。我在尝试运行bundle安装时遇到此错误 You are trying to install in deployment mode after changing your Gem

我正在尝试制作一个Rails应用程序,但它无法安装所需的gems。我得到的错误是:

部署设置需要Gemfile.lock。请确保你有

部署前已将Gemfile.lock检查到版本控制中


我试着在没有部署标志的情况下运行它,但这并没有帮助。有什么想法吗?

我通过尝试从另一个项目复制gemfile.lock文件解决了这个问题。我在尝试运行bundle安装时遇到此错误

You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

If this is a development machine, remove the
C:/Users/Danny/Desktop/paper-db/Gemfile freeze
by running `bundle config --delete frozen`.

我运行了
bundle config--delete freezed
命令,现在我可以运行bundle安装并为我的项目生成一个gemfile.lock文件。似乎出于某种原因,我的项目的默认模式是部署模式,尽管我多次尝试重新安装rails和bundler。。。希望这能帮助任何遇到和我一样问题的人

我通过尝试从另一个项目复制gemfile.lock文件来修复此问题。我在尝试运行bundle安装时遇到此错误

You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

If this is a development machine, remove the
C:/Users/Danny/Desktop/paper-db/Gemfile freeze
by running `bundle config --delete frozen`.

我运行了
bundle config--delete freezed
命令,现在我可以运行bundle安装并为我的项目生成一个gemfile.lock文件。似乎出于某种原因,我的项目的默认模式是部署模式,尽管我多次尝试重新安装rails和bundler。。。希望这能帮助任何遇到和我一样问题的人

所以没有
gemfile.lock
文件,它说您需要它。是否
gemfile.lock
包含在
gitignore
中?是否使用Capistrano?我不使用Capistrano,并且没有gemfile.lock.gemfile.lock与gemfile在同一目录中?您是否检查了文件权限(644)?这可能是一个愚蠢的问题,但值得检查。在创建Rails应用程序(
Rails new my app
)之后,在运行
bundle install
之前,您是否将
cd
放入应用程序的根目录(
cd my app
)中?因此没有
gemfile.lock
文件,它说您需要它。是否
gemfile.lock
包含在
gitignore
中?是否使用Capistrano?我不使用Capistrano,并且没有gemfile.lock.gemfile.lock与gemfile在同一目录中?您是否检查了文件权限(644)?这可能是一个愚蠢的问题,但值得检查。创建Rails应用程序(
Rails new my app
)后,在运行
捆绑安装之前,您是否将
cd
放入应用程序的根目录(
cd my app
)中?