Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Aghyad Saleh's Profile

GitHub User: aghyad


Comments by Aghyad Saleh


After creating a new migration, I always run:

$ rake db:migrate db:test:clone

which propagates any migrations to both development and test environments equally


Very nice. I have to mention that PDFKit is also used to generate pdf files from html strings as follows:

html = "< h1>pla pla pla< /h1>"
kit =, :page_size => 'Letter')
pdf = kit.to_pdf
file = kit.to_file("path/to/pdf/with/pdf_name.pdf")

Note: this might throw an error of missing wkhtmltopdf even when you unstall wkhtmltopdf, and I found out that you still need to install ghostscript to you computer (mine is Mac 10.7.4).