heroku run rake db:migrate: 没有这样的文件或目录 [英] heroku run rake db:migrate: No such file or directory

查看:72
本文介绍了heroku run rake db:migrate: 没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm new in Rails and i'm trying to upload my first rails app to Heroku.

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

I already have my app in Heroku, but when I try to create the database I get this error:

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 日志,并得到以下错误:

This really doesn't tell me anything though. So I checked the Heroku logs, and get the following error:

: 没有那个文件或目录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:

This is my 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

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

Im using Ruby 2.1.0 with Rails 4.1.1. Any help will be welcome. Please let me know if you need something else.

谢谢!

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

I've found the solution. Apparently I had to update the files located at bin folder with this command:

rake rails:update:bin

推荐答案

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

I've found the solution. Apparently i had to update the files located at bin folder with this command

rake rails:update:bin

这篇关于heroku run rake db:migrate: 没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆