I''m trying to setup a dev site on Mac OS X tiger using WEBrick and sqlite3, despite following all the tutorials, I''m am still getting this error ArgumentError in Contact#index No database file specified. Missing argument: dbfile script/server:49 when I try and use a controller. I have - checked the file permissions on the database file and folder (777), - have made sure that I installed the sqlite3-ruby gem - tested the database access in the rails console (failed) - tried an absolute path in database.yml and nothing seems to work?!?!? If any one can shed some light on this for me, I would be greatly appreciated as I really don''t want to install mysql on my ibook. Thanks Scott Arthur _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Hi Scott - what does your database.yml file look like? Have you specified the sqlite database filename under the ''development'', ''test'' and ''production'' headings in the file (as below)? dbfile: /path/to/your/sqlite/file.sqlite Also, can you access the DB using the sqlite3 command line? One other gotcha is to make sure you have ''swig'' installed before you install the SQLite3 gem, as without that it uses the pure ruby adapter, which has several bugs. Cheers! -David Felstead On 8/5/05, Scott Arthur <scott-2vIkDnebgV7SUeElwK9/Pw@public.gmane.org> wrote:> I''m trying to setup a dev site on Mac OS X tiger using WEBrick and sqlite3, > despite following all the tutorials, I''m am still getting this error > > ArgumentError in Contact#index > > No database file specified. Missing argument: dbfile > > script/server:49 > > when I try and use a controller. > > I have > > - checked the file permissions on the database file and folder (777), > - have made sure that I installed the sqlite3-ruby gem > - tested the database access in the rails console (failed) > - tried an absolute path in database.yml > > and nothing seems to work?!?!? > > If any one can shed some light on this for me, I would be greatly > appreciated as I really don''t want to install mysql on my ibook. > > Thanks > Scott Arthur > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Thanks heaps David I had database: /path/to/sqlite/file.db not dbfile: /path/to/sqlite/file.db It''s always something so simple!! Scott On 5/08/2005, at 12:35 PM, David Felstead wrote:> Hi Scott - what does your database.yml file look like? Have you > specified the sqlite database filename under the ''development'', ''test'' > and ''production'' headings in the file (as below)? > > dbfile: /path/to/your/sqlite/file.sqlite > > Also, can you access the DB using the sqlite3 command line? > > One other gotcha is to make sure you have ''swig'' installed before you > install the SQLite3 gem, as without that it uses the pure ruby > adapter, which has several bugs. > > Cheers! > > -David Felstead > > On 8/5/05, Scott Arthur <scott-2vIkDnebgV7SUeElwK9/Pw@public.gmane.org> wrote: > >> I''m trying to setup a dev site on Mac OS X tiger using WEBrick and >> sqlite3, >> despite following all the tutorials, I''m am still getting this error >> >> ArgumentError in Contact#index >> >> No database file specified. Missing argument: dbfile >> >> script/server:49 >> >> when I try and use a controller. >> >> I have >> >> - checked the file permissions on the database file and folder (777), >> - have made sure that I installed the sqlite3-ruby gem >> - tested the database access in the rails console (failed) >> - tried an absolute path in database.yml >> >> and nothing seems to work?!?!? >> >> If any one can shed some light on this for me, I would be greatly >> appreciated as I really don''t want to install mysql on my ibook. >> >> Thanks >> Scott Arthur >> >> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >