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

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

新規登録して質問してみよう
ただいま回答率
85.50%
LINE Messaging API

LINE Messaging APIは、メッセージの送信・返信ができるAPIです。Web APIを経由しアプリケーションサーバとLINEのAPIでやり取りが可能。複数のメッセージタイプや分かりやすいAPIリファレンスを持ち、グループチャットにも対応しています。

Heroku

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

Ruby on Rails

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

Q&A

解決済

1回答

422閲覧

HerokuでApp crushedのエラーがでる

ari1235

総合スコア11

LINE Messaging API

LINE Messaging APIは、メッセージの送信・返信ができるAPIです。Web APIを経由しアプリケーションサーバとLINEのAPIでやり取りが可能。複数のメッセージタイプや分かりやすいAPIリファレンスを持ち、グループチャットにも対応しています。

Heroku

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

Ruby on Rails

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

0グッド

0クリップ

投稿2018/06/21 15:51

編集2018/06/21 17:48

前提・実現したいこと

line_APIを使ってlineおうむ返しbotを作っていました。参考にしたサイトはこちら

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

2018-06-21T15:31:10.348036+00:00 heroku[run.8066]: Starting process with command `rails console` 2018-06-21T15:31:10.466416+00:00 heroku[run.8066]: State changed from starting to up 2018-06-21T15:31:13.117781+00:00 heroku[web.1]: State changed from starting to crashed 2018-06-21T15:31:12.976684+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated 〜中略〜 2018-06-21T15:31:25.974880+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/callback"

heroku run rails console したらこんな感じ

/app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:124:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError) from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>' ... 8072 levels... from /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!' from /app/vendor/bundle/ruby/2.4.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>' from /app/bin/rails:9:in `require' from /app/bin/rails:9:in `<main>'

試したこと

heroku restart heroku restart web.1 --app application_nameは試し、bundle installbundle updateもしてみました。
gem_fileに問題があるんだと思うんだけど、、、

補足情報(FW/ツールのバージョンなど)

herokuのaddonとして、DBをmysqlにするためにcleardbと、line_APIを使うためにfixieを使った。
DBをmysqlにするためのバージョン合わせ等は行なった。
gemfile全文は以下

source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.6' # Use mysql as the database for Active Record gem 'mysql2', '0.3.18' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.1.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Unicorn as the app server # gem 'unicorn' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' end group :development do # Access an IRB console on exception pages or by using <%= console %> in views gem 'web-console', '~> 2.0' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' end gem 'dotenv-rails' gem 'faraday' gem 'faraday_middleware' group :production do gem 'rails_12factor' end

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

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

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

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

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

asm

2018/06/21 16:41

gemfile全文出せませんか?
ari1235

2018/06/21 17:49

質問を全文に編集し直しました!
guest

回答1

0

ベストアンサー

RailsのRuby2.4サポートは4.2.8以降です

よって、Ruby2.3を使う もしくは Rails4.2.8以降(ちなみに4.2系最新は4.2.10)を使う
が選択肢になります。


Railsを4.2.10にバージョンアップする方法

  1. Gemfileをgem 'rails, '4.2.10''に書き換える
  2. bundle update たぶんエラーでるので適宜Gemfile内のgemのバージョンを書き換える
  3. rake rails:update 変更点を確認しつつ適用したりスキップしたり

こんな感じ

投稿2018/06/21 22:23

編集2018/06/21 22:24
asm

総合スコア15147

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

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

ari1235

2018/06/23 07:11

``gem 'rails, '4.2.10''``を書き換えて``bundle install``もし、``rake rails:update``も行いました。``bundle install``後にエラーが出ているかわからなかったので実行後のコードをみて欲しいです。 ``` Using rake 12.3.1 Using concurrent-ruby 1.0.5 Using i18n 0.9.5 Using minitest 5.11.3 Using thread_safe 0.3.6 Using tzinfo 1.2.5 Using activesupport 4.2.10 Using builder 3.2.3 Using erubis 2.7.0 Using mini_portile2 2.3.0 Using nokogiri 1.8.3 Using rails-deprecated_sanitizer 1.0.3 Using rails-dom-testing 1.0.9 Using crass 1.0.4 Using loofah 2.2.2 Using rails-html-sanitizer 1.0.4 Using actionview 4.2.10 Using rack 1.6.10 Using rack-test 0.6.3 Using actionpack 4.2.10 Using globalid 0.4.1 Using activejob 4.2.10 Using mini_mime 1.0.0 Using mail 2.7.0 Using actionmailer 4.2.10 Using activemodel 4.2.10 Using arel 6.0.4 Using activerecord 4.2.10 Using debug_inspector 0.0.3 Using binding_of_caller 0.8.0 Using bundler 1.16.0 Using byebug 10.0.2 Using coffee-script-source 1.12.2 Using execjs 2.7.0 Using coffee-script 2.4.1 Using thor 0.20.0 Using railties 4.2.10 Using coffee-rails 4.1.1 Using dotenv 2.5.0 Using dotenv-rails 2.5.0 Using multipart-post 2.0.0 Using faraday 0.15.2 Using faraday_middleware 0.12.2 Using ffi 1.9.25 Using multi_json 1.13.1 Using jbuilder 2.7.0 Using jquery-rails 4.3.3 Using json 1.8.6 Using mysql2 0.3.18 Using sprockets 3.7.2 Using sprockets-rails 3.2.1 Using rails 4.2.10 Using rails_serve_static_assets 0.0.5 Using rails_stdout_logging 0.0.5 Using rails_12factor 0.0.3 Using rb-fsevent 0.10.3 Using rb-inotify 0.9.10 Using rdoc 4.3.0 Using sass-listen 4.0.0 Using sass 3.5.6 Using tilt 2.0.8 Using sass-rails 5.0.7 Using sdoc 0.4.2 Using spring 2.0.2 Using turbolinks-source 5.1.0 Using turbolinks 5.1.1 Using uglifier 4.1.12 Using web-console 2.3.0 Bundle complete! 16 Gemfile dependencies, 68 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. ```
asm

2018/06/23 07:13

大丈夫そうですが、状況変わりませんか?
ari1235

2018/06/23 07:54

heroku log をみていたらcontrollerにsyntax errorが出てて、みてみたらコメントアウトしたつもりのところができてませんでした!コメントアウトしたら、とりあえずApp crushedのエラーは出なくなったので解決しました!!ただ、lineのおうむ返しbotはまだおうむ返しをしてくれないので、まだまだエラーがありそうです(泣)。ひとまず解決で、rails のバージョンについて教えていただきありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問