簡體   English   中英

Rails 和 Heroku:bash:rails:找不到命令

[英]Rails & Heroku: bash: rails: command not found

我正在嘗試進入我的 rails heroku 數據庫。 通常我只是運行:

heroku run rails console

但它給了我一個錯誤: bash: rails: command not found

我不知道是什么原因造成的。 還沒有更新我的項目代碼。

heroku --version
heroku-toolbelt/3.36.5 (x86_64-darwin15) ruby/2.2.4
heroku-cli/5.6.14-b0cc983 (darwin-amd64) go1.7.4
=== Installed Plugins
heroku-redis@1.2.8

我也遇到了同樣的情況。 我的問題是我沒有在第一次推送之前提交我的更改,所以我沒有啟動項目。 我做了:

git add .
git commit -m "first commit"
git push origin heroku

然后,在嘗試 rails c 之前,您需要設置數據庫。

heroku run rake db:migrate

我關注了這個devcenter.heroku: Getting started with rails4

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM