`require’: no such file to load — mkmf (LoadError)

I was trying to install rails on Ubuntu Natty Narwhal 11.04, using ruby1.9.1. I installed ruby using apt-get install ruby1.9.1-full which contains the dev package. I googled the error and all have suggested I install the 1.9.1-dev which I already have. Building native extensions. This could take a while… ERROR: Error installing rails: ERROR: Failed … Read more

Ruby on Rails Server options [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

Begin, Rescue and Ensure in Ruby?

I’ve recently started programming in Ruby, and I am looking at exception handling. I was wondering if ensure was the Ruby equivalent of finally in C#? Should I have: file = File.open(“myFile.txt”, “w”) begin file << “#{content} \n” rescue #handle the error here ensure file.close unless file.nil? end or should I do this? #store the … Read more

Difference between rake db:migrate db:reset and db:schema:load

The difference between rake db:migrate and rake db:reset is pretty clear to me. The thing which I don’t understand is how rake db:schema:load is different from the former two. Just to be sure that I am on the same page: rake db:migrate – Runs the migrations which haven’t been run yet. rake db:reset – Clears … Read more