質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

1回答

618閲覧

RailsでアプリをHerokuにデプロイする時のエラーを解消したいです2

gomatamago

総合スコア7

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2017/10/17 08:26

編集2017/10/23 06:11

###前提・実現したいこと
前提 
Rails 5.1.4
ruby 2.3.3

問題
Railsで作成したアプリをHerokuにデプロイしたあとにApplicationErrorが表示されます。
こちらのErrorを解消したいです。
デプロイはうまくいっているようで、WARNING等はとくに出ていないです。

###発生している問題・エラーメッセージ

/app/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:32:in `require': libruby.so.2.3: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so (LoadError) from /app/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:32:in `rescue in <top (required)>' from /app/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:28:in `<top (required)>'

###該当のソースコード

$ heroku run rails console

###補足情報(言語/FW/ツール等のバージョンなど)
作成したアプリはrailstutorialを確認しながら、Controllerとroutesを触っただけとなります。
ローカルのrails s では表示がされていますが、Herokuだと上記メッセージが発生し、正しく動いていないかと思います。

gemfileとgemfil.lockを追記いたします
#gemfile

コード
source 'https://rubygems.org'
ruby '~> 2.3.0'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end

gem 'rails', '> 5.1.4'
gem 'puma', '
> 3.7'
gem 'sass-rails', '> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '
> 4.2'
gem 'turbolinks', '> 5'
gem 'jbuilder', '
> 2.5'

group :production do
gem 'pg', '0.20.0'
end

group :development, :test do
gem 'sqlite3'
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end

group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

#gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.4)
actionpack (= 5.1.4)
nio4r (> 2.0)
websocket-driver (
> 0.6.1)
actionmailer (5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
mail (> 2.5, >= 2.5.4)
rails-dom-testing (
> 2.0)
actionpack (5.1.4)
actionview (= 5.1.4)
activesupport (= 5.1.4)
rack (> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (
> 2.0)
rails-html-sanitizer (> 1.0, >= 1.0.2)
actionview (5.1.4)
activesupport (= 5.1.4)
builder (
> 3.1)
erubi (> 1.4)
rails-dom-testing (
> 2.0)
rails-html-sanitizer (> 1.0, >= 1.0.3)
activejob (5.1.4)
activesupport (= 5.1.4)
globalid (>= 0.3.6)
activemodel (5.1.4)
activesupport (= 5.1.4)
activerecord (5.1.4)
activemodel (= 5.1.4)
activesupport (= 5.1.4)
arel (
> 8.0)
activesupport (5.1.4)
concurrent-ruby (> 1.0, >= 1.0.2)
i18n (
> 0.7)
minitest (> 5.1)
tzinfo (
> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (8.0.0)
bindex (0.5.0)
builder (3.2.3)
byebug (9.1.0)
capybara (2.15.4)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (> 2.0)
childprocess (0.8.0)
ffi (
> 1.0, >= 1.0.11)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
crass (1.0.2)
erubi (1.7.0)
execjs (2.7.0)
ffi (1.9.18)
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.9.0)
concurrent-ruby (> 1.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
listen (3.1.5)
rb-fsevent (
> 0.9, >= 0.9.4)
rb-inotify (> 0.9, >= 0.9.7)
ruby_dep (
> 1.2)
loofah (2.1.1)
crass (> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.6.6)
mime-types (>= 1.16, < 4)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (
> 3.2015)
mime-types-data (3.2016.0521)
mini_mime (0.1.4)
mini_portile2 (2.3.0)
minitest (5.10.3)
multi_json (1.12.2)
nio4r (2.1.0)
nokogiri (1.8.1)
mini_portile2 (> 2.3.0)
pg (0.20.0)
public_suffix (3.0.0)
puma (3.10.0)
rack (2.0.3)
rack-test (0.7.0)
rack (>= 1.0, < 3)
rails (5.1.4)
actioncable (= 5.1.4)
actionmailer (= 5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
activemodel (= 5.1.4)
activerecord (= 5.1.4)
activesupport (= 5.1.4)
bundler (>= 1.3.0)
railties (= 5.1.4)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (
> 2.0)
railties (5.1.4)
actionpack (= 5.1.4)
activesupport (= 5.1.4)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.1.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
ruby_dep (1.5.0)
rubyzip (1.2.1)
sass (3.5.2)
sass-listen (> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (
> 0.9, >= 0.9.4)
rb-inotify (> 0.9, >= 0.9.7)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (
> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
selenium-webdriver (3.6.0)
childprocess (> 0.5)
rubyzip (
> 1.0)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.1)
concurrent-ruby (> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
turbolinks (5.0.1)
turbolinks-source (
> 5)
turbolinks-source (5.0.3)
tzinfo (1.2.3)
thread_safe (> 0.1)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
web-console (3.5.1)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.1.0)
nokogiri (
> 1.3)

PLATFORMS
ruby

DEPENDENCIES
byebug
capybara (> 2.13)
coffee-rails (
> 4.2)
jbuilder (> 2.5)
listen (>= 3.0.5, < 3.2)
pg (= 0.20.0)
puma (
> 3.7)
rails (> 5.1.4)
sass-rails (
> 5.0)
selenium-webdriver
spring
spring-watcher-listen (> 2.0.0)
sqlite3
turbolinks (
> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)

RUBY VERSION
ruby 2.3.3p222

BUNDLED WITH
1.16.0.pre.3

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kenchankunsan

2017/10/21 10:10

GemfileとGemfile.lockを追記していただけると何かわかるかもしれません。
gomatamago

2017/10/23 06:12

ありがとうございます。情報を追記いたしました。
guest

回答1

0

追記していただいたのですが、再現させることはできませんでした…

調べてみるとStack Overflowには似た質問がありました。ruby on rails - Heroku LoadError: libruby.so.2.2 - Stack Overflow

以下のコマンドで、一度heroku側のキャッシュを削除するとうまくいくケースがあるようです。

heroku plugins:install heroku-repo heroku repo:purge_cache

投稿2017/10/26 12:07

kenchankunsan

総合スコア240

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

gomatamago

2017/10/29 14:34

ありがとうございました。一度やって見ます。また結果を記載します。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問