rails/railtie/configuration.rb:97:in `method_missing': undefined method `action_mailer'
while updating from rails 4 to rails 6.0.1.
Previous version of ruby was 2.4
New Ruby version I am using is ruby 3.0.0
Related
So I am trying to solve a class problem/homework on repl.it, in ruby, and this is the error listing I'm given.
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
undefined method `filter' for [{:r=>1, :c=>0}, {:r=>0, :c=>1}]:Array
(repl):61:in `escape'
(repl):79:in `maze_escape'
(repl):82:in `<main>'
I can't understand the reason for this, because filter is clearly a method that is defined for the class Array, as a part of Ruby core, Here
You are using ruby version 2.5.5.
Array#filter was added to ruby version 2.6.0.
However, the method is merely an alias for Array#select - so you can use this instead, if you are unable to upgrade the ruby version right now.
Note: The documentation you linked to is for ruby version 2.6.3 (i.e. the latest, at the time of writing). You can see the (almost-identical) documentation for version 2.5.5 here.
Are you using ruby 2.6?filter is only available in ruby 2.6.
If you are using version prior than 2.6, use select instead of filter.
I could not find a "direct" answer to this anywhere. Since I know there will be many other "Late Upgraders" to the party, I feel I need to get this out.
I had a Rails 4.0.0 app running Ruby 2.0.0-p247. After upgrading to 4.0.13, I ran into this error:
private method `include' called for ActionDispatch::Assertions:Module (NoMethodError)
I received this through rspec and WEBrick.
I found a solution via another issue from layer-ruby: NoMethodError: private method `include' called for #-Class:#-Layer::RelationProxy:0x007fd1f67016e0--
geoffreymm discovered that install Ruby 2.2.0 Fixed the issue.
I installed Ruby 2.2.5, and it did indeed solve the issue for me.
NoMethodError: undefined method 'perform' for nil:nilClass
The message above is what I'm getting from my command line. This is after a type in my path and then the sass --watch input.scss:output.css then it returns the above error message.
SASS version: 3.2.14
Ruby version: 2.0.0 (The most recent version)
Windows 8
Using a localhost and a testing server.
I need help! :)
Hi this is "usually" a problem with your sass code and not with the compiler itself. Track back a few steps and see if you added any unusual code like IE filters etc.
You can refer here for more
Sass error on compilation NoMethodError: undefined method `count' for nil:NilClass Use --trace for backtrace
Just pulled latest code and now getting:
...my_app/Gemfile:2:in `evaluate':
undefined method `ruby' for #<Bundler::Dsl:0x007fc17c3fc6c8> (NoMethodError)
The ruby method that allows you to specify the version of Ruby your project should use was only added in Bundler 1.2. You’ve got a project with a Gemfile that uses this new ruby method, but have an old version of Bundler. You just need to get Bundler 1.2 with
gem install bundler
and you should be good to go.
The full error is:
/Users/me/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.8/lib/rails/railtie/configuration.rb:77:in `method_missing': undefined method `action_mailer' for #<Rails::Application::Configuration:0x00000102f545f8> (NoMethodError)
I've searched several variations of this error and come up empty.
Thanks.
Probably you're requiring only specific parts from rails in you application.rb (i.e., not using require rails/all). Try putting require "rails/all" in there.
i uninstalled rails 3.0.8 files and then reinstalled rails 3.0.8 and that fixed the problem.