heroku loginがターミナルからできないとき
$ heroku login
$ heroku: Press any key to open up the browser to login or q to exit:
と出てしまいなにかキーをクリックすると下記のページがブラウザで開いてしまう。
対処方法は
$ heroku login -i
で解決!
$ heroku login
$ heroku: Press any key to open up the browser to login or q to exit:
$ heroku login -i
RoRで作ったアプリをherokuにデプロイ$ git push heroku master
したら以下のようなエラーがremote: An error occurred while installing sqlite3 (1.3.13), and Bundler cannot
remote: continue
remote: Make sure that `gem install sqlite3 -v '1.3.13'` succeeds before bundling.
remote:
remote: In Gemfile:
remote: sqlite3
remote:
remote: !
remote: ! Failed to install gems via Bundler.
remote: ! Detected sqlite3 gem which is not supported on Heroku:
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to glacial-tor-45483.
remote:
To https://git.heroku.com/glacial-tor-45483.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/glacial-tor-45483.git'
gemfileのgem 'sqlite3'
をコメントアウトしてgem 'sqlite3', groups: %w(test development), require: false
gem 'pg', groups: %w(production), require: false
を挿入。
その後bundle install
としたら、postgresqlがインストールされていないと怒らえる。An error occurred while installing pg (1.1.3), and Bundler cannot continue.
Make sure that `gem install pg -v '1.1.3' --source 'https://rubygems.org/'` succeeds before bundling.
postgresqlをインストール
$ brew install postgresql $ bundle install
$ git add .
$ git commit -m "コメント"
$ git push heroku master
$ rails g scaffold blog title:string body:text
Could not find gem 'sqlite3' in any of the gem sources listed in your Gemfile.
bundle install --path vendor/bundle