Carl Youngblood
2005-Jun-24 04:24 UTC
uninitialized constant SQLite::API even though sqlite-ruby gem is installed
I am trying to set up a rails app that uses sqlite on DreamHost. After spending hours spinning my wheels only to figure out that there was a permissions problem on my public dir and dispatch files, I now have another error: uninitialized constant SQLite::API I''m assuming this is happening because rails is not looking for sqlite-ruby as a gem instead of as a regular include. Where is the proper place in my rails app to fix this? Thanks, Carl Youngblood
Jamis Buck
2005-Jun-24 14:06 UTC
Re: uninitialized constant SQLite::API even though sqlite-ruby gem is installed
On Jun 23, 2005, at 10:24 PM, Carl Youngblood wrote:> I am trying to set up a rails app that uses sqlite on DreamHost. > After spending hours spinning my wheels only to figure out that there > was a permissions problem on my public dir and dispatch files, I now > have another error: > > uninitialized constant SQLite::API > > I''m assuming this is happening because rails is not looking for > sqlite-ruby as a gem instead of as a regular include. Where is the > proper place in my rails app to fix this?The easiest way is to put "require ''rubygems''" in your environment.rb. I assume doing: require ''rubygems'' require ''sqlite'' in irb works fine? - Jamis
Carl Youngblood
2005-Jun-24 14:29 UTC
Re: uninitialized constant SQLite::API even though sqlite-ruby gem is installed
Unfortunately DreamHost doesn''t have irb installed, but yes, running a
one-liner with that inside works great.
However, when I examine environment.rb, I see the following line:
require ''rubygems'' unless
File.directory?("#{RAILS_ROOT}/vendor/rails")
The specified directory doesn''t exist, so this should be requiring
rubygems, but it doesn''t seem to be.
On 6/24/05, Jamis Buck <jamis-uHoyYlH2B+GakBO8gow8eQ@public.gmane.org>
wrote:> On Jun 23, 2005, at 10:24 PM, Carl Youngblood wrote:
>
> > I am trying to set up a rails app that uses sqlite on DreamHost.
> > After spending hours spinning my wheels only to figure out that there
> > was a permissions problem on my public dir and dispatch files, I now
> > have another error:
> >
> > uninitialized constant SQLite::API
> >
> > I''m assuming this is happening because rails is not looking
for
> > sqlite-ruby as a gem instead of as a regular include. Where is the
> > proper place in my rails app to fix this?
>
> The easiest way is to put "require ''rubygems''"
in your
> environment.rb. I assume doing:
>
> require ''rubygems''
> require ''sqlite''
>
> in irb works fine?
Jamis Buck
2005-Jun-24 14:37 UTC
Re: uninitialized constant SQLite::API even though sqlite-ruby gem is installed
On Jun 24, 2005, at 8:29 AM, Carl Youngblood wrote:> Unfortunately DreamHost doesn''t have irb installed, but yes, running a > one-liner with that inside works great. > > However, when I examine environment.rb, I see the following line: > > require ''rubygems'' unless File.directory?("#{RAILS_ROOT}/vendor/ > rails") > > The specified directory doesn''t exist, so this should be requiring > rubygems, but it doesn''t seem to be. >What version of the gem is installed? - Jamis
Carl Youngblood
2005-Jun-24 14:40 UTC
Re: uninitialized constant SQLite::API even though sqlite-ruby gem is installed
sqlite-ruby (2.2.3)
SQLite/Ruby is a module to allow Ruby scripts to interface with a
SQLite database.
On 6/24/05, Jamis Buck <jamis-uHoyYlH2B+GakBO8gow8eQ@public.gmane.org>
wrote:> What version of the gem is installed?
>
> - Jamis
Tobias Luetke
2005-Jun-25 14:51 UTC
Re: uninitialized constant SQLite::API even though sqlite-ruby gem is installed
Again. I''d just use this script:> Unfortunately DreamHost doesn''t have irb installed, but yes, running a > one-liner with that inside works great. >http://blog.leetsoft.com/articles/2005/06/17/installing-rails-made-easy -- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog