将 rails 应用程序推送到 heroku [英] push rails app to heroku

查看:38
本文介绍了将 rails 应用程序推送到 heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一个 rails 应用程序推送到 heroku.

I am trying to push a rails application to heroku.

当我到达最后一步时:

git push heroku master

它不起作用并给我这些错误:

It doesn't work and gives me these errors:

Counting objects: 85, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (74/74), done.
Writing objects: 100% (85/85), 24.38 KiB, done.
Total 85 (delta 23), reused 0 (delta 0)

-----> Heroku receiving push
 !     Heroku push rejected, no Rails or Rack app detected.

error: hooks/pre-receive exited with error code 1
To git@heroku.com:smooth-dusk-26.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:smooth-dusk-26.git'

我不知道我做错了什么:(

I don't know what I'm doing wrong :(

推荐答案

当您创建 Rails 应用程序时,您是否将目录更改为应用程序的目录?您必须从应用程序目录中执行所有命令.

When you created your Rails application, did you change directory into the directory of the application? You have to perform all the commands from within the application's directory.

rails myapp
cd myapp

这篇关于将 rails 应用程序推送到 heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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