Sunday, July 1, 2012

rails with sqlite - suddenly became a little nightmare

So I decided to reinstall rails on one of my virtual machines since I really fucked it up and there was no restore image available. Though to myself I'll just waste 3 minutes and everything will be up and running. What I did not expect is that reinstalling sqlite3 which I use for Dev will cause me such an headache.

while creating new project using "rails new someProject" the bundler had problems with the sqlite installation saying "an error occurred while installing sqlite3 (1.3.6) " . Googled a bit about it and found so many people having the same problem but nothing worked. the gem file and the sqlite3 installation did not want to work together. The solutions varied from tweaking every possible file related to ruby to uninstalling everything you ever had....
after trying all sorts of voodoo from  stackoverflow I found out the solution (among 10 other I tried) which is to install a dev version of sqlite using "apt-get install libsqlite3-dev".
So first of all I posted it here not to forget it once I'll run into this weird issue again. What surprised me the most is that nothing in the error messages implied that the problem is with the version itself nor did the gem file gave me any clue about it.

Getting back onto linux after so many years working only with windows surely takes its toll.



No comments: