`method_missing ': undefined method` action_mailer' for # <Rails :: Application :: Configuration: 0x00>
I am creating a rails application and have used rails 4.0.1. I had an error, and I noticed that it was mentioned as an error on the rails 3 months ago, so I decided: to combine the update and get the rails 4.0.3
after that, neither the tests nor the server started, and they gave an error:
gems / railties-4.0.3 / lib / rails / railtie / configuration.rb: 95: in `method_missing ': undefined method` action_mailer' for # (NoMethodError)
At the moment, I commented out the action_mailer lines in config / environment / *, but it would be nice to find a real solution. A Google search did not give anything regarding this particular error.
Please let me know if I can provide more details. Thank you very much.
UPDATE: here is my gemfile
source 'https://rubygems.org' ruby '2.0.0' gem 'bootstrap-sass' gem 'bootstrap_form' gem 'coffee-rails' gem 'rails' gem 'haml-rails' gem 'sass-rails' gem 'uglifier' gem 'jquery-rails' gem 'bcrypt-ruby', '~> 3.1.2' group :development do gem 'sqlite3' gem 'thin' # gem "better_errors" gem "binding_of_caller" end group :production do gem 'pg' gem 'rails_12factor' end group :development, :test do gem 'rspec-rails' gem 'pry' gem 'pry-nav' end group :test do gem "faker" gem "capybara" gem "database_cleaner" gem "launchy" gem 'shoulda-matchers' gem "selenium-webdriver" gem "fivemat" gem 'fabrication' end A solution is found if someone lands here:
The main problem was that in my Gemfile, as you can see, no specific version of gem was installed (except for bcrypt) Anyway, this makes the package obsolete versions under circumstances that are not clear to me yet.
Steps to fix:
- remove gemset completely (if you use it) or remove all gems
- remove gemfile.lock
- indicate which version of the rails you need, for example.
'rails', '~> 4.0.3' bundle install
you install :)