Rails: Missing host to link to! Please provide :host parameter or set default_url_options[:host]

You need to add the following line at every environment: config.action_mailer.default_url_options = { :host => “yourhost” } That way, it can work in all environments and could be different from environment to environment. For example: development.rb config.action_mailer.default_url_options = { :host => “dev.yourhost.com” } test.rb config.action_mailer.default_url_options = { :host => “test.yourhost.com” } production.rb config.action_mailer.default_url_options = { … Read more

iOS Tests/Specs TDD/BDD and Integration & Acceptance Testing

tl;dr At Pivotal we wrote Cedar because we use and love Rspec on our Ruby projects. Cedar isn’t meant to replace or compete with OCUnit; it’s meant to bring the possibility of BDD-style testing to Objective C, just as Rspec pioneered BDD-style testing in Ruby, but hasn’t eliminated Test::Unit. Choosing one or the other is … Read more

When to use RSpec let()?

I always prefer let to an instance variable for a couple of reasons: Instance variables spring into existence when referenced. This means that if you fat finger the spelling of the instance variable, a new one will be created and initialized to nil, which can lead to subtle bugs and false positives. Since let creates … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)