Install SQLite3 in Ubuntu

  1. Install Sqlite3
    
    sudo apt-get install sqlite3 libsqlite3-dev
    sudo gem install sqlite3-ruby
  2. To create a data base, we only need to create a empty file.
    
    touch database_name_dev.db
    touch database_name_test.db
    touch database_name_prod.db
    
  3. Configure Ruby on Rails Modificar el archivo config/database.yml:
    
    development:
      adapter: sqlite3
      database: db/database_name_dev.db
    
    test:
      adapter: sqlite3
      database: db/database_name_test.db
    
    production:
      adapter: sqlite3
      database: db/database_name_prod.db
    

28 comments so far

  1. Nuno Caldeira on

    very usefull.. thank you

  2. Chris on

    Just what I needed, thanks!

  3. pat on

    thanks! just used this, complete success!

  4. kishore on

    Thank you it solved my problem too..

  5. XhtmlWeaver on

    Very neat instruction for sqllite3 for ubuntu/debian. Great!

  6. chamira on

    thanks you for this, i needed to install libsqlite3-dev for the Ruby gem sqlite3-ruby to install correctly.

  7. Dextersmart on

    This was exactly what I needed. Thanks for the solution.

  8. Dheeraj.k on

    krishna@ubuntu:~$ sudo gem install sqlite3-ruby
    sudo: gem: command not found

    • Lolcat on

      (note i use ruby 1.8 therefore I use rubygems1.8)
      Firstly did you install ruby gems ?
      sudo apt-get install rubygems1.8
      Now lets find gems!
      sudo dpkg -L rubygems1.8 | grep /usr/bin
      … so we see its called gem1.8 and *not* gems , which explains command not found.
      Lets make a link from /usr/bin/gem1.8 to /usr/bin/gems
      sudo ln -s /usr/bin/gem1.8 /usr/bin/gems

      now finally run gems -v to check it is working.

  9. RyanonRails on

    Some people might needs to run apt-get install libsqlite3-ruby to get all of the dependencies.

  10. SeanW on

    Thanks RyanonRails!

    Your advice (+ the one to apt-get ruby-dev in order to install gems properly) saved my day. Later this week trying to install on Windows7.

  11. someone on

    Amazing, Thanks! xD

  12. UnderTech09 on

    ;need some help here…
    how to install libmysqlclient.so.15 in ubuntu?
    when i run my mysql with the server game, i got an error
    * error while loading shared libraries: libmysqlclient.so.15: cannot open share object file: no such file or directory.

    anyone can help up with this problem?
    thanks in advance..

  13. Upender on

    very thanks..

  14. shirish herwade on

    very useful

  15. Asma on

    sudo: gem: command not found 😦

    • Pedro on

      Yo need to install ruby gems, but only if you are planning to use ruby or ruby on rails

  16. Robbie Done on

    worked a treat 😀

    • Pedro on

      Great, nice to see that 5 years later is still useful.

  17. webhostingtop3.com on

    I’ll right away take hold of your rss feed as I can’t to find your email
    subscription link or newsletter service. Do you’ve any? Please allow me realize so that I may just subscribe. Thanks.

  18. Mark on

    Not so far I have found new cool tool to work with SQLite on ubuntu – Valentina Studio. Its free edition can do things more than many commercial tools!!
    I very recommend check it. http://www.valentina-db.com/en/valentina-studio-overview

  19. rasoolsb on

    Fabulous…. Moooooaaaahhhh 🙂

  20. Johnb231 on

    Howdy would you mind sharing which blog platform you’re working edcfbbekedce

  21. […] Install SQLite3 in Ubuntu | The Plan A – May 11, 2007 · Install Sqlite3 sudo apt-get install sqlite3 libsqlite3-dev sudo gem install sqlite3-ruby; To create a data base, we only need to create a empty file…. […]

  22. […] Install SQLite3 in Ubuntu | The Plan A – May 11, 2007 · krishna@ubuntu:~$ sudo gem install sqlite3-ruby sudo: gem: command not found… […]

  23. sfhsn on

    var __machform_url = ‘http://eu.nimbocraft.com/form/embed.php?id=11943’;
    var __machform_height = 941;


Leave a comment

  • Design a site like this with WordPress.com
    Get started