35777


作成したRailsアプリを

[code]

    $ git push heroku master
    
[/code]

すると、以下のエラーが発生します。

[code]

    remote: -----> Ruby app detected
    remote: -----> Compiling Ruby/Rails
    remote: -----> Using Ruby version: ruby-2.3.4
    remote: -----> Installing dependencies using bundler 1.13.7
    remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
    remote:        Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
    remote:        Fetching gem metadata from https://rubygems.org/..........
    remote:        Fetching version metadata from https://rubygems.org/..
    remote:        Fetching dependency metadata from https://rubygems.org/.
    remote:        Installing i18n 0.8.0
    remote:        Installing rake 12.0.0
    remote:        Installing concurrent-ruby 1.0.4
    remote:        Installing minitest 5.10.1
    remote:        Installing thread_safe 0.3.5
    remote:        Installing builder 3.2.3
    remote:        Installing erubis 2.7.0
    remote:        Installing mini_portile2 2.1.0
    remote:        Installing rack 2.0.1
    remote:        Installing nio4r 1.2.1 with native extensions
    remote:        Installing websocket-extensions 0.1.2
    remote:        Installing mime-types-data 3.2016.0521
    remote:        Installing arel 7.1.4
    remote:        Installing execjs 2.7.0
    remote:        Installing bcrypt 3.1.11 with native extensions
    remote:        Installing sass 3.4.23
    remote:        Installing coffee-script-source 1.12.2
    remote:        Installing method_source 0.8.2
    remote:        Installing thor 0.19.4
    remote:        Installing orm_adapter 0.5.0
    remote:        Installing tilt 2.0.6
    remote:        Installing multi_json 1.12.1
    remote:        Installing nested_form 0.3.2
    remote:        Installing puma 3.7.0 with native extensions
    remote:        Using bundler 1.13.7
    remote:        Installing remotipart 1.3.1
    remote:        Installing ref 2.0.0
    remote:        Installing simple-rss 1.3.1
    remote:        Installing sqlite3 1.3.13 with native extensions
    remote:        Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES
    remote:        section: 'libv8'
    remote:        Bundler Output: Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
    remote:        Fetching gem metadata from https://rubygems.org/..........
    remote:        Fetching version metadata from https://rubygems.org/..
    remote:        Fetching dependency metadata from https://rubygems.org/.
    remote:        Installing i18n 0.8.0
    remote:        Installing rake 12.0.0
    remote:        Installing concurrent-ruby 1.0.4
    remote:        Installing minitest 5.10.1
    remote:        Installing thread_safe 0.3.5
    remote:        Installing builder 3.2.3
    remote:        Installing erubis 2.7.0
    remote:        Installing mini_portile2 2.1.0
    remote:        Installing rack 2.0.1
    remote:        Installing nio4r 1.2.1 with native extensions
    remote:        Installing websocket-extensions 0.1.2
    remote:        Installing mime-types-data 3.2016.0521
    remote:        Installing arel 7.1.4
    remote:        Installing execjs 2.7.0
    remote:        Installing bcrypt 3.1.11 with native extensions
    remote:        Installing sass 3.4.23
    remote:        Installing coffee-script-source 1.12.2
    remote:        Installing method_source 0.8.2
    remote:        Installing thor 0.19.4
    remote:        Installing orm_adapter 0.5.0
    remote:        Installing tilt 2.0.6
    remote:        Installing multi_json 1.12.1
    remote:        Installing nested_form 0.3.2
    remote:        Installing puma 3.7.0 with native extensions
    remote:        Using bundler 1.13.7
    remote:        Installing remotipart 1.3.1
    remote:        Installing ref 2.0.0
    remote:        Installing simple-rss 1.3.1
    remote:        Installing sqlite3 1.3.13 with native extensions
    remote:        Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES
    remote:        section: 'libv8'
    remote:  !
    remote:  !     Failed to install gems via Bundler.
    remote:  !
    remote:  !     Push rejected, failed to compile Ruby app.
    remote: 
    remote:  !     Push failed
    remote: Verifying deploy...
    
[/code]

どうすればデプロイに成功するのかアドバイス頂きたく、よろしくお願いいたします。

開発環境  
macOS  
Ruby 2.4  
Rails 5.0.1

追記  
自己解決できました。  
ブランチを切って作業していたのが原因でした。  
変更をマスターブランチにマージしたらデプロイ出来ました。


CC BY-SA 3.0
2017-06-21T06:58:14.407
35774
2017-06-26T06:33:46.373
2017-06-26T06:33:46.373
76
23933
question
ruby-on-rails ruby git heroku
Herokuにデプロイできない


Gemfile で therubyracer が有効になっているなら削除して再bundleしてみてください。

Railsではasset処理のためにJavaScriptランタイムが必要なのですが、herokuのrubyビルドパックにはnodejsが組み込まれているので、別途libv8(を使うtherubyracer)をインストールする必要はありません。

開発環境もmacということはOSのJavaScriptランタイムを使ってくれるので同じくtherubyracerは不要です。

<http://naruse.hateblo.jp/entry/2016/01/08/134941>  
<https://devcenter.heroku.com/articles/rails-asset-pipeline#troubleshooting>


CC BY-SA 3.0
2017-06-21T08:01:45.677
35777
2017-06-21T08:01:45.677
17037
35774
answer