Rails – The Matchbox https://www.setfiremedia.com/blog Hot ideas for the web. Wed, 07 Oct 2009 16:55:09 +0000 en-US hourly 1 https://wordpress.org/?v=5.5.6 Running Cucumber Tasks Through Selenium on Internet Explorer https://www.setfiremedia.com/blog/running-cucumber-tasks-through-selenium-on-internet-explorer https://www.setfiremedia.com/blog/running-cucumber-tasks-through-selenium-on-internet-explorer#comments Wed, 07 Oct 2009 16:24:59 +0000 http://www.setfiremedia.com/blog/?p=307 We all need to test our code on Internet Explorer and when set up correctly, this can be the best way.

I’m not going to go over installing Ruby, MySQL (you need version 5.0), Apache etc as there are a million and one tutorials out there. I will mention however that you can save yourself some time by simply connecting to your development server (remember, you will need to open up your SQL server for remote access). I’m also not going to go over setting up selenium profiles as I’m assuming you’ve already got your tests running under a *nix environment.

Now once you’ve got your applications installed and checked out a copy of your code you need to make sure you have the right gems – exactly the same set as you needed on your development server, although I would also recommend win32console as it will give you the text colouring on your test output (and also randomly remove all of the letter As. No, really!).

Now comes the fun part. There are a series of hacks you need to do to Ruby and its gems to get them working under Windows:

  • Install MySQL 5.0 if you haven’t already and copy libmySQL.dll from the MySQL bin folder to the Ruby bin folder, overwriting the default version.
  • Change any reference to IP ‘0.0.0.0’ to ‘127.0.0.1’ in the webrat gem. This is needed because Windows will not view ‘0.0.0.0’ as localhost.
  • Add ‘start’ before the ‘mongrel_rails’ command in the ‘start_command’ function in ‘\selenium\application_servers\rails.rb’. This will cause the mongrel server to be run in a new console window which is needed because the mongrel *nix detach flag does not work in a Windows console.
  • Add ‘-interactive -forcedBrowserMode iexplore’ to the start command in ‘\lib\selenium\remote_control\remote_control.rb’.
  • Increase your timeouts
    • Add ‘config.selenium_browser_startup_timeout = 50’ to your selenium profile.
    • Timeouts also defined in ‘\selenium\selenium_rc_server.rb
  • Make sure you have your browser set correctly in your selenium profile with the correct path. Something along the lines of:
    • config.selenium_browser_key = ‘*iexplore C:\Program files\Internet Explorer\ie.exe’

Then run your tests and you should find your tests running quite happily.

]]>
https://www.setfiremedia.com/blog/running-cucumber-tasks-through-selenium-on-internet-explorer/feed 2
Capistrano Continues With Help From Setfire Developer https://www.setfiremedia.com/blog/capistrano-continues-with-help-from-setfire-developer https://www.setfiremedia.com/blog/capistrano-continues-with-help-from-setfire-developer#respond Wed, 04 Mar 2009 14:24:53 +0000 http://www.setfiremedia.com/blog/?p=172 logo-big

We’re proud to announce that as of today one of our developers, Lee Hambley has taken over maintenance of capify.org. For many people involved in Ruby on Rails development, Capistrano is a vital tool, making the whole process of maintaining production environments that much simpler, by automating and combining many of the more laborious and repetitive tasks involved.

Having been an active member of the user group for sometime, when Lee heard the sad news that original developer Jamis Buck had to give up maintenance of the project, he offered to take it on.

I’m really excited about working with the other contributors to maintain and improve Capistrano and it’s documentation, watching the project gain speed now the code is a little bit more free is going to be awesome. – Lee

He will be hosting and maintaining the Capify.org site, as well as consolidating and hopefully coordinating new developments to the gem when a new code maintainer is selected. Find out more about Capistrano by visiting capify.org, or the Capistrano google group.

]]>
https://www.setfiremedia.com/blog/capistrano-continues-with-help-from-setfire-developer/feed 0