Giter Site home page Giter Site logo

Can't connect to Sqlite3 about camping HOT 7 CLOSED

camping avatar camping commented on June 12, 2024
Can't connect to Sqlite3

from camping.

Comments (7)

techarch avatar techarch commented on June 12, 2024

MK, I just install Pik (the equivalent of RVM on Windows) and installed 1.9.2 (ruby 1.9.2dev (2010-05-31) [i386-mingw32]).
I had to install the latest sqlite3-ruby -v 1.3.1 to be able to get the Nuts database creation to work:

C:\Prj\Poc\ruby-1.9.2\camping21test>camping nuts.rb -c
** Starting console
-- create_table("nuts_schema_infos")
-> 0.0782s
== Nuts::Models::BasicFields: migrating ======================================
-- create_table("nuts_pages")
-> 0.0782s
== Nuts::Models::BasicFields: migrated (0.0782s) =============================

Doing some research showed that 1.9.x changed the way the interface to sqlite3 works. So you might want to check that.
For reference here is my detailed setup:

ruby 1.9.2dev (2010-05-31) [i386-mingw32]

*** LOCAL GEMS ***

activerecord (2.3.5)
activesupport (2.3.5)
builder (2.1.2)
camping (2.1)
markaby (0.7.1)
minitest (1.6.0)
rack (1.2.1)
rake (0.8.7)
rdoc (2.5.8)
sqlite3-ruby (1.3.1 x86-mingw32)
tilt (1.0.1)

Hope that helps. Investigating this gave me the extra nudge to tackle the setup of Pik on my machine - which I had wanted to do for a while! ;-)

from camping.

judofyr avatar judofyr commented on June 12, 2024

Hm. Could you:

  1. Make sure you have installed the latest Camping (2.1)
  2. Set RUBYOPTS to "-rcamping-unabridged"
  3. Run the app again
  4. Show us the full backtrace

Oh, and which version/platform are you running on? 1.9.1 or 1.9.2?

from camping.

mkarges avatar mkarges commented on June 12, 2024

Thank you both. I'm running 1.9.1 on Tiger.
I just installed sqlite3-ruby 1.3 and I don't get the anonymous modules error anymore (for the record, here's the backtrace: http://pastie.org/1107914)
Instead I get this error: http://pastie.org/1107933.

from camping.

judofyr avatar judofyr commented on June 12, 2024

Rails/ActiveRecord does not support 1.9.1 as far as I know. Please upgrade to 1.9.2 (which is just released).

from camping.

mkarges avatar mkarges commented on June 12, 2024

Rails works fine with ActiveRecord. I'd install 1.9.2 but I'm worried about my system punking out.

from camping.

techarch avatar techarch commented on June 12, 2024

Actually if you use RVM (http://rvm.beginrescueend.com/) you will be able to install 1.9.2 in a completely isolated space which will not interfere with your normal setup. Since I am on Windows I used Pik but RVM is similar. So essentially once you have installed RVM you can install different versions of Ruby and switch between them. And you gem install the gems you need inside each isolated version. Try it out you will soon love it!

from camping.

mkarges avatar mkarges commented on June 12, 2024

I'd like to use RVM but I'm getting dense compiler errors when I try to install any version of Ruby.
I solved this problem for the moment by rolling back to a Ruby 1.8 install; all works fine now. I'll have to get back to the future when I have more time, hopefully soon.
Cheers,
MK

from camping.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.