Interesting infographic about ruby, rails, gems etc from New Relic:
http://blog.newrelic.com/wp-content/uploads/Ruby-State-of-the-Stack-Infographic_2013.jpg
Interesting infographic about ruby, rails, gems etc from New Relic:
http://blog.newrelic.com/wp-content/uploads/Ruby-State-of-the-Stack-Infographic_2013.jpg
Problem
You get the following warning after an update to your system (ie Ubuntu 13.10):
WARNING: Nokogiri was built against LibXML version 2.9.0, but has dynamically loaded 2.9.1
Solution
Uninstall your nokogiri versions:
gem uninstall nokogiri
and then run install it again (inside your application if you use bundler) with:
bundle install
Problem
After a new rvm installation in an (k)ubuntu system you get the following error from rvm when trying to switch between rubies:
You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin/bash --login` as the command. Please visit https://rvm.io/integration/gnome-terminal/ for a example.
Solution
As the message suggests you can change the setting in your terminal which is fine if you are using the gnome-terminal by going to the link provided:
Please visit https://rvm.io/integration/gnome-terminal/ for a example.
but if you are using Konsole in KDE you need to go to a different link that explains the change in the settings:
Please visit http://rvm.io/integration/konsole/ for a example.
Problem
You have a rails application with many migrations build over time and you want to recreate the database from start. Should you be using the normal way of running the migrations (db:migrate) or the one that loads the actual schema to the database (db:schema:load).
Solution
According to the book Rails 4 in Action (MEAP v9 page 146) :
The bin/rake db:migrate task runs the migrations and then dumps the structure of the database to a file called db/schema.rb. This structure allows you to restore your database using the bin/rake db:schema:load task if you wish, which is better than running all the migrations on a large project again! NOTE
NOTE: Large projects can have hundreds of migrations, which may not run due to changes in the system over time. It’s best to just use the bin/rake db:schema:load.