bang_head_on_wall

James' blog

  • RSS
  • Delicious
  • Facebook
  • Twitter

You need to upgrade your Flash Player to version 10 or newer.

I had a hard time with selinux with this until I found some information on stackoverflow. http://stackoverflow.com/questions/2054554/passenger-mod-rails-fails-to-initialize-in-fedora-12-when-starting-apache 1. Go into permissive mode by running setenforce 0 2. Restart apache, and hit your site and use it for a while as normal 3. Run grep httpd /var/log/audit/audit.log | audit2allow -M passenger 4. semodule -i passenger.pp 5. Go back to enforcing mode by running setenforce 1 6. Restart apache and test your  [ Read More ]

connect to Nailgun server: Connection refused

Posted by admin January - 21 - 2012 0 Comment

Fix: cd $rvm_path/hooks chmod a-x after_use_jruby

Heres a rough test function for doing this conversion by reading the EXIF data on an image. More to come… def process_lat_lon if self.photo.to_s.match(“jpg$”) or self.photo.to_s.match(“JPG$”) or self.photo.to_s.match(“JPEG$”) or self.photo.to_s.match(“jpeg$”) a = EXIFR::JPEG.new(Rails.root.to_s + “/public” + “#{self.photo}”) #converts to ‘geopoint’ if(a.exif[0].gps_latitude and a.exif[0].gps_longitude) lat = a.exif[0].gps_latitude[0].to_f + (a.exif[0].gps_latitude[1].to_f / 60) + (a.exif[0].gps_latitude[2].to_f / 3600) long = a.exif[0].gps_longitude[0].to_f + (a.exif[0].gps_longitude[1].to_f / 60) + (a.exif[0].gps_longitude[2].to_f / 3600) long = long * -1  [ Read More ]

I was attempting to do high level integration testing in Ruby on Rails. This processes involves Capybara calling selenium (through selenium-webdriver) to bring up firefox in order to do some manipulation of the user interface to test my web app. I ran into an issue where Firefox4 would not start from the command line. The packages involved along with selenium are capybara 0.4.1.2, selenium webdriver 0.1.4, Rails 3.0.3, RSpec 2.4.0,  [ Read More ]

Capybara with RSpec

Posted by admin April - 1 - 2011 0 Comment

After watching the Railscast about Capybara I decided to give it a try. As the Railscast says Capybara fills in the missing functionality in rspec/webrat integration testing where javascript calls are not testable. Initially I was planning on trying cucumber first, but I preferred to use Capybara because the syntax was very similar to webrat which I was already familiar with. Also the ability to open the browser Requires: RSpec  [ Read More ]

Cannot delete cookie in javascript

Posted by admin April - 1 - 2011 0 Comment

For some strange reason, I wasn’t able to delete a cookie using javascript. I would set the cookie value to expire in 1970 yet printing document.cookie at the console would still show that the cookie existed. Turns out that amongst other things the cookie path needs to be the same.

Devise rspec tests and integration tests

Posted by admin March - 10 - 2011 1 Comment

In my recent attempt to use Devise as an authentication/authorization module with my Rails3 app I created some tests for testing a user controller as well as some integration tests. Here they are… Specs describe UsersController do include Devise::TestHelpers render_views describe "User functions" do before(:each) do @user1 = Factory(:user) @user2 = Factory(:user, :email => 'a2@b.com') @user3 = Factory(:user, :email => 'a3@b.com') @users = [@user1, @user2, @user3] @attr = { :email  [ Read More ]

Move WordPress to another server or domain

Posted by admin November - 30 - 2010 0 Comment

I was trying to migrate my wordpress instance from one of our test servers to our production server which has a different name and IP address.  I found that simply copying the wordpress directory and moving the database wasn’t enough to perform a full migration.  I wanted to be able to migrate multiple databases with a single button click, without having to log into each system and modify values. After  [ Read More ]

Install Rails 3

Posted by admin October - 27 - 2010 0 Comment

I installed Rails3 and encountered one main error.  After using rails to create a new project doing a rails -v caused an error with sqlite3.   After searching around, I found that some people were using an old version of Xcode maybe the culprit.  It would have taken too long for me to download Xcode so instead I installed an older version of sqlite.  I’ll leave installing the newest version  [ Read More ]

Simple instructions to root your Motorola Droid 1 phone and setup tethering in order to get wireless 3G internet from your Droid phone.  Tethering in this context creates a wireless hotspot for all your devices to use.  This was done on Froyo 2.2 FRG22D build.  Instructions should work for all other Froyo builds.  These instructions were adapted for MAC from this original post.  Thanks to OMJ for putting together the  [ Read More ]

  • Cheap reliable web hosting from WebHostingHub.com.
  • Domain name search and availability check by PCNames.com.
  • Website and logo design contests at DesignContest.net.
  • Reviews of the best cheap web hosting providers at WebHostingRating.com.