Popular Tags:

Run a remote ruby script locally.

November 25, 2012 at 4:14 pm

If you ever want to try a ruby script without downloading it you can do it like this:

ruby -e "$(curl -fsSL https://raw.github.com/gist/3862719/bb2a7a18f3dc4d95cfa77d637317e296a114eak1/some_script.rb)"

I know this is not rocket science but i want to have this line handy.

rake routes filtered by controller

September 23, 2011 at 1:15 pm

rake routes CONTROLLER=controller_name

Paperclip content type validation always fails on Internet Explorer

September 23, 2011 at 1:01 pm

I just ran into a strange problem. It turns out that when you try to upload a file using paperclip on IE, the content-type is different from other browsers and you have to take of them if you want to use paperclip’s validates_attachment_content_type method.

I needed to add to my model validation the following content-types: “image/pjpeg” and “image/x-png”. I did not have a problem with gifs.

validates_attachment_content_type :logo, :content_type => ['image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg', 'image/x-png']

Spector

September 14, 2011 at 5:21 pm

Never fade away

Not what you wanted

They kind of remind me of “The Killers”

September 14, 2011 at 1:10 am

Don’t listen to people, listen to yourself. That’s all I have to say at the end of the day. You’re the most important person to you. If you are doubting yourself, you are doubting any sort of success that you have set for yourself. Make your decisions and run with it. You can always fix something if it’s broken…but…you can’t do anything if you don’t even start.

Don’t play by the rules

Rails 3.1: CoffeScript & Asset Pipiline screencasts

September 7, 2011 at 3:34 pm

Rails 3.1 – CoffeScript from BostonRB on Vimeo.

Rails 3.1 – The Asset Pipeline from BostonRB on Vimeo.

rbx-require-relative requires Ruby version ~> 1.8.7

August 17, 2011 at 4:45 pm

If you ever run into this problem when trying to run bundle install using ruby 1.9.2 all you need to do is change in your Gemfile ruby-debug to ruby-debug19.

Answer @ Stackoverflow

links for 2011-06-01

June 1, 2011 at 10:02 pm