1

I created Rails 5.1.2 app and deployed to Heroku.

At local, everything is all right, but when deployed to Heroku, below errors occured at starting puma.

/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.2/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `counter_culture' for #<Class:0x00000003296690> (NoMethodError)

I specified ruby version to 2.4.1 in my Gemfile,

source 'https://rubygems.org'
ruby '2.4.1'

and heroku cli returns ruby version as below.

heroku run "ruby -v"
Running ruby -v on ⬢ my-app... up, run.1200 (Free)
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]

but logs from puma says that

from /app/vendor/bundle/ruby/2.4.0/

and cannot find method of counter_culture gem.

Someone knows how to resolve this error?

When testing by Heroku CI, this error was not caused.

Pascal
  • 8,464
  • 1
  • 20
  • 31
myoo
  • 333
  • 2
  • 11

1 Answers1

0

Thank you for pointing it out.

I put gem 'counter_culture' into group :development, :test. It's mistake.

Thanks and Sorry for bother you. Cheers!

myoo
  • 333
  • 2
  • 11