Ruby on Rails: Pitfall/Disadvantage of RubyMine ::UnKnown issues :: Reasons

One day I encountered an issue as following, however my app was running smoothly a minute ago and I did not make any change whatsoever.

/home/leapfrog/.rvm/gems/ruby-2.1.2/gems/actionmailer-4.1.4/lib/action_mailer/base.rb:787:in `smtp_settings=': wrong number of arguments (1 for 0) (ArgumentError)
 from /home/leapfrog/project/bid-quote/config/initializers/setup_mail.rb:3:in `<top (required)>'
 from /home/leapfrog/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
 from /home/leapfrog/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `block in load'

I had this code in my /config/initializers/setup_mail.rb

ActionMailer::Base.smtp_settings = {
 :address => "",
 :port => "587",
 :domain => CommonConstants::EMAIL_DOMAIN,
 :user_name => CommonConstants::EMAIL_UNAME,
 :password => "**********",
 :authentication => "plain",
 :enable_starttls_auto => true

After doing some research, I figured out the hell happened to my code.

I unknowingly CTRL + CLICKed on smtp_settings of above code. RubyMine’s navigation did its job further and a file from core of Rails got opened and unknowingly I typed ‘=’. I checked the list of files I changed from last commit to GIT in ‘Changes ‘ tab in RubyMine, But no changes were made. This is because the file I unknowingly modified, was not from my app repo.

  # = in next line was added by me unknowingly
  def self.smtp_settings=
   # code here

Note: If you are facing problems that you don’t know where is it coming from in ruby on rails and you use rubyMine as IDE.


  • Untraceable error 
  • Git says “no changes made to repo”

Cure / Solution:

  • Try to navigate back (Alt + Left key) and undo abnormal coding or just Re-install Rails
  • Take care what you CTRL+CLICK

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s