I struggled for a while to get sqlite3 to work together well with Ruby and Ruby on Rails under Cygwin. I eventually figured it out, here is the procedure to save others some time : This procedure concerns the following software versions: ruby 1.8.5 (2006-08-25) [i386-cygwin] sqlite version 3.3.8 sqlite3-ruby (1.1.0) (Ruby gem) rails (1.1.6) (Ruby gem) Install Cygwin and Rails as described on this page: http://wiki.rubyonrails.org/rails/pages/RailsonWindowsCygwin Then, download the sqlite3 sources from the SQLite download page (http://www.sqlite.org/download.html). I compiled the 3.3.8 version from the source tarball. wget http://www.sqlite.org/sqlite-3_3_8.zip Extract the tarball and read the README for compilation instructions. You will need to install GCC and Make using the Cygwin installer. After compilation you will have sqlite3.exe. You will also need to build the .dll. In the sqlite source directory type make sqlite3.dll The copy the .dll and the .exe to somewhere on your path, eg: cp sqlite3.exe sqlite3.dll ~/bin Now install the sqlite3-ruby gem (choosing the latest mswin32 version) gem install sqlite3-ruby You have to make a change to this file c:/cygwin/lib/ruby/gems/1.8/gems/ \ sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/driver/dl/ So that it reads when /win32/, /i386-cygwin/ "sqlite3.dll" And you should be able to specify sqlite3 as the database in your database.yml, for example : development: adapter: sqlite3 database: db/residence_development.db Any updates, corrections etc. please let me know, and I''ll add them to http://chrislowis.co.uk/rails.html Chris -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Bill Walton
2006-Oct-18 16:29 UTC
Re: How to get SQLite3, Cygwin and Rails to work together
Thank you, Chris! Excellent stuff. It would be super to have this on the wiki. Best regards, Bill ----- Original Message ----- From: "Chris Lowis" <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> To: <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Sent: Wednesday, October 18, 2006 11:03 AM Subject: [Rails] How to get SQLite3, Cygwin and Rails to work together> > I struggled for a while to get sqlite3 to work together well with Ruby > and Ruby on Rails under Cygwin. I eventually figured it out, here is the > procedure to save others some time : > > This procedure concerns the following software versions: > > ruby 1.8.5 (2006-08-25) [i386-cygwin] > sqlite version 3.3.8 > sqlite3-ruby (1.1.0) (Ruby gem) > rails (1.1.6) (Ruby gem) > > Install Cygwin and Rails as described on this page: > > http://wiki.rubyonrails.org/rails/pages/RailsonWindowsCygwin > > Then, download the sqlite3 sources from the SQLite download page > (http://www.sqlite.org/download.html). I compiled the 3.3.8 version from > the source tarball. > > wget http://www.sqlite.org/sqlite-3_3_8.zip > > Extract the tarball and read the README for compilation instructions. > You will need to install GCC and Make using the Cygwin installer. > > After compilation you will have sqlite3.exe. You will also need to build > the .dll. In the sqlite source directory type > > make sqlite3.dll > > The copy the .dll and the .exe to somewhere on your path, eg: > > cp sqlite3.exe sqlite3.dll ~/bin > > Now install the sqlite3-ruby gem (choosing the latest mswin32 version) > > gem install sqlite3-ruby > > You have to make a change to this file > > c:/cygwin/lib/ruby/gems/1.8/gems/ \ > sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/driver/dl/ > > So that it reads > > when /win32/, /i386-cygwin/ > "sqlite3.dll" > > And you should be able to specify sqlite3 as the database in your > database.yml, for example : > > development: > adapter: sqlite3 > database: db/residence_development.db > > Any updates, corrections etc. please let me know, and I''ll add them to > http://chrislowis.co.uk/rails.html > > > Chris > > > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Chris Lowis
2006-Oct-18 17:05 UTC
Re: How to get SQLite3, Cygwin and Rails to work together
Bill Walton wrote:> Thank you, Chris! Excellent stuff. It would be super to have this on > the wiki.I''m happy to add it there. Shall I create a new page linked from the Rails/Cygwin page ? Chris -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Bill Walton
2006-Oct-18 19:13 UTC
Re: How to get SQLite3, Cygwin and Rails to work together
Chris Lowis wrote:> > Bill Walton wrote: >> Thank you, Chris! Excellent stuff. It would be >> super to have this on the wiki. > > I''m happy to add it there. Shall I create a new page > linked from the Rails/Cygwin page ?Not sure exactly where you''re talking about. I was thinking somewhere in the HowTo section. http://wiki.rubyonrails.org/rails Maybe in the installation section. http://wiki.rubyonrails.com/rails/pages/HowtosInstallation Wherever you decide, Google will find it ;-) Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Chris Lowis
2006-Oct-19 10:43 UTC
Re: How to get SQLite3, Cygwin and Rails to work together
Bill Walton wrote:> Thank you, Chris! Excellent stuff. It would be > super to have this on the wiki.Done ! http://wiki.rubyonrails.com/rails/pages/RailsOnWindowsCygwinWithSQLite3 I''ve linked to it from : http://wiki.rubyonrails.org/rails/pages/RailsonWindowsCygwin Chris -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---