gpt4 book ai didi

ruby - heroku 运行 rake db :migrate: No such file or directory

转载 作者:数据小太阳 更新时间:2023-10-29 08:27:12 27 4
gpt4 key购买 nike

我是 Rails 的新手,我正在尝试将我的第一个 Rails 应用程序上传到 Heroku。

我的应用程序已经在 Heroku 中,但是当我尝试创建数据库时出现此错误:

vagrant@rails-forge:~/apps/betsman$ heroku run rake db:migrate --app betsman
Running `rake db:migrate` attached to terminal... up, run.3809
: No such file or directory

虽然这真的没有告诉我任何事情。所以我检查了 Heroku 日志,并得到以下错误:

: 没有那个文件或目录00:00 app[web.1]:/usr/bin/env: ruby​​

vagrant@rails-forge:~/apps/betsman$ heroku logs
2014-06-17T02:23:23.680853+00:00 heroku[api]: Enable Logplex by personal_email
2014-06-17T02:23:23.680979+00:00 heroku[api]: Release v2 created by personal_email
2014-06-17T02:25:22.844616+00:00 heroku[api]: Starting process with command `echo $RAILS_ENV` by personal_email
2014-06-17T02:38:43.002052+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_CRIMSON resource by personal_email
2014-06-17T02:38:43+00:00 heroku[slug-compiler]: Slug compilation finished
: No such file or directory00:00 app[web.1]: /usr/bin/env: ruby
2014-06-17T02:38:49.957936+00:00 heroku[web.1]: State changed from crashed to starting
2014-06-17T02:38:49.957154+00:00 heroku[web.1]: State changed from starting to crashed
2014-06-17T02:38:49.938918+00:00 heroku[web.1]: Process exited with status 127
2014-06-17T02:38:47.948496+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 17686 -e production`
: No such file or directory00:00 app[web.1]: /usr/bin/env: ruby

这是我的 Gemfile:

ruby '2.1.0'

gem 'pg'
gem 'rails', '4.1.1'
gem 'sass-rails', '~> 4.0.3'
#gem 'sass-rails', github: 'rails/sass-rails', branch: :master
#gem 'sprockets-rails', github: 'rails/sprockets-rails', branch: '2-1-stable'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jquery-turbolinks'
gem 'font-awesome-sass'
# gem 'bootstrap-sass'
# gem 'flat-ui-sass', github: 'wingrunr21/flat-ui-sass'
gem 'devise'
gem 'pundit'
gem 'simple_form', '~> 3.1.0.rc1'
gem 'slim-rails'
gem 'active_model_serializers', github:'rails-api/active_model_serializers' , branch: 'master'
gem 'various', '~> 0.0.2'
gem 'modernizr-rails'
gem 'bower-rails', '~> 0.7.2'
gem 'draper'
gem 'smart_listing'
gem 'cocoon'
# gem 'active_interaction'
gem 'virtus'
gem 'devise_invitable'
gem 'figaro'

group :development do
gem 'better_errors'
gem 'binding_of_caller', platforms: [:mri_21]
gem 'quiet_assets'
gem 'rails_layout'
gem 'spring'
gem 'hirb'
gem 'awesome_print'
end

group :development, :test do
gem 'factory_girl_rails'
gem 'pry-rails'
gem 'pry-rescue'
gem 'rspec-rails', '>= 3.0.0.beta2'
gem 'faker'
end

group :test do
gem 'database_cleaner'
gem 'shoulda-matchers', '~> 2.6.1'
end

group :production do
gem 'rails_12factor'
gem 'thin'
end

我在 Rails 4.1.1 中使用 Ruby 2.1.0。欢迎任何帮助。如果您需要其他东西,请告诉我。

谢谢!

编辑:

我找到了解决方案。显然我必须使用以下命令更新位于 bin 文件夹中的文件:

rake rails:update:bin

最佳答案

我找到了解决方案。显然我必须使用此命令更新位于 bin 文件夹中的文件

rake rails:update:bin

关于ruby - heroku 运行 rake db :migrate: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24255510/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com