Hi, I''ve been reading about RoR for a couple weeks now, and I''m really interested in trying it out now although I have had no exprience with Ruby before. I''ve got Ruby 1.8.2 and Rails 0.8 (gem) installed on my XP machine, and want to use SQLite and WEBrick. What are the steps to get this setup, to the point where I can start on the TODO list tutorial? Do I download the latest version of SQLite (3.x) or version 2.x? Also how do I get Ruby, or Rails to see the database? Is there anything I need to setup for WEBrick or will it automatically configure itself to use port 3000 on localhost? Any help would be appreciated! Thanks, Abdullah
I think the easiest would be to use mysql. SQLLite requires a ruby extension while a mysql adapter is shipped with rails. At http://blog.leetsoft.com/about you can find video tutorials which will take you step by step to a great rails development enviroment on windows using apache2 and mysql. On Mon, 15 Nov 2004 09:18:27 -0800 (PST), Abdullah Jibaly <amjibaly-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''ve been reading about RoR for a couple weeks now, > and I''m really interested in trying it out now > although I have had no exprience with Ruby before. > I''ve got Ruby 1.8.2 and Rails 0.8 (gem) installed on > my XP machine, and want to use SQLite and WEBrick. > What are the steps to get this setup, to the point > where I can start on the TODO list tutorial? Do I > download the latest version of SQLite (3.x) or version > 2.x? Also how do I get Ruby, or Rails to see the > database? Is there anything I need to setup for > WEBrick or will it automatically configure itself to > use port 3000 on localhost? Any help would be > appreciated! > > Thanks, > Abdullah > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://blog.leetsoft.com
You''ll need to download two things. The first is SQLite itself. You can grab it at http://www.sqlite.org/. Just grab the pre-built Windows DLL for version 2.x (not the 3.x branch). The second thing SQLite/Ruby (http://sqlite-ruby.rubyforge.org/). It comes with the extension library pre-built for Windows. Make sure the SQLite is in your path. And then run the install for SQLite/Ruby. Everything after that is pretty simple (i.e. writing the code). -- Justin Rudd http://seagecko.org/thoughts/
with gems it is even easier gem install rails gem install sqlite and it works ;) On Mon, 15 Nov 2004 10:17:23 -0800, Justin Rudd <justin.rudd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You''ll need to download two things. The first is SQLite itself. You > can grab it at http://www.sqlite.org/. Just grab the pre-built > Windows DLL for version 2.x (not the 3.x branch). The second thing > SQLite/Ruby (http://sqlite-ruby.rubyforge.org/). It comes with the > extension library pre-built for Windows. > > Make sure the SQLite is in your path. And then run the install for > SQLite/Ruby. Everything after that is pretty simple (i.e. writing the > code). > > -- > Justin Rudd > http://seagecko.org/thoughts/ > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi all, Wow, thanks for the responses... it did work however after adding scaffold :todo in the todo controller I get the screen shown in the tutorial that says "Listing todos", but when I click on the new todo hyperlink it brings me back to the same page. I got the impression from the tutorial that I would be able to add a new record and then see it in a listing, right? Here is the controller code: require ''abstract_application'' require ''todo_helper'' require ''todo'' class TodoController < AbstractApplicationController include TodoHelper scaffold :todo end ... and the database.yml file: production: adapter: sqlite dbfile: C:/Inetpub/wwwroot/Todo/db/todo_production test: adapter: sqlite dbfile: C:/Inetpub/wwwroot/Todo/db/todo_test .. and the schema in todo_production: sqlite> .schema create table todos ( id integer primary key, description varchar(100) not null, done smallint not null ); When I manually add a row in the db it does show up in the listing however clicking on Show/Edit/Destory gives me: Unknown action No action responded to 1 So what newbie mistake am I making? Thanks! Abdullah --- Michel Rasschaert <michel.rasschaert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> with gems it is even easier > > gem install rails > gem install sqlite > > and it works ;) > > > On Mon, 15 Nov 2004 10:17:23 -0800, Justin Rudd > <justin.rudd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > You''ll need to download two things. The first is > SQLite itself. You > > can grab it at http://www.sqlite.org/. Just grab > the pre-built > > Windows DLL for version 2.x (not the 3.x branch). > The second thing > > SQLite/Ruby (http://sqlite-ruby.rubyforge.org/). > It comes with the > > extension library pre-built for Windows. > > > > Make sure the SQLite is in your path. And then > run the install for > > SQLite/Ruby. Everything after that is pretty > simple (i.e. writing the > > code). > > > > -- > > Justin Rudd > > http://seagecko.org/thoughts/ > > > > > > _______________________________________________ > > 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 >
3kru-hpyd-5+VhGm8TZF7QT0dZR+AlfA@public.gmane.org
2004-Nov-15 22:09 UTC
Re: XP, WEBrick, and SQLite
Try adding a slash (/) at the end of the URL -- this is a bug (I think) that has already been mentioned. On Mon, 15 Nov 2004 13:03:22 -0800 (PST), Abdullah Jibaly <amjibaly-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> * Replies will be sent through Spamex to rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > * For additional info click -> http://www.spamex.com/i/?v=4990968 > > Hi all, > > Wow, thanks for the responses... it did work however > after adding scaffold :todo in the todo controller I > get the screen shown in the tutorial that says > "Listing todos", but when I click on the new todo > hyperlink it brings me back to the same page. I got > the impression from the tutorial that I would be able > to add a new record and then see it in a listing, > right? Here is the controller code: > > require ''abstract_application'' > require ''todo_helper'' > require ''todo'' > > class TodoController < AbstractApplicationController > include TodoHelper > > scaffold :todo > > end > > ... and the database.yml file: > > production: > adapter: sqlite > dbfile: C:/Inetpub/wwwroot/Todo/db/todo_production > > test: > adapter: sqlite > dbfile: C:/Inetpub/wwwroot/Todo/db/todo_test > > .. and the schema in todo_production: > > sqlite> .schema > create table todos ( > id integer primary key, > description varchar(100) not null, > done smallint not null > ); > > When I manually add a row in the db it does show up in > the listing however clicking on Show/Edit/Destory > gives me: > > Unknown action > > No action responded to 1 > > So what newbie mistake am I making? > > Thanks! > Abdullah > > --- Michel Rasschaert <michel.rasschaert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > with gems it is even easier > > > > gem install rails > > gem install sqlite > > > > and it works ;) > > > > > > On Mon, 15 Nov 2004 10:17:23 -0800, Justin Rudd > > <justin.rudd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > You''ll need to download two things. The first is > > SQLite itself. You > > > can grab it at http://www.sqlite.org/. Just grab > > the pre-built > > > Windows DLL for version 2.x (not the 3.x branch). > > The second thing > > > SQLite/Ruby (http://sqlite-ruby.rubyforge.org/). > > It comes with the > > > extension library pre-built for Windows. > > > > > > Make sure the SQLite is in your path. And then > > run the install for > > > SQLite/Ruby. Everything after that is pretty > > simple (i.e. writing the > > > code). > > > > > > -- > > > Justin Rudd > > > http://seagecko.org/thoughts/ > > > > > > > > > _______________________________________________ > > > 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 > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Tuesday, November 16, 2004, 8:03:22 AM, Abdullah wrote:> Hi all,> Wow, thanks for the responses... it did work however > after adding scaffold :todo in the todo controller I > get the screen shown in the tutorial that says > "Listing todos", but when I click on the new todo > hyperlink it brings me back to the same page. I got > the impression from the tutorial that I would be able > to add a new record and then see it in a listing, > right? Here is the controller code:I''ve noticed a bug that had the ''new'' link pointing to ''/appname/todo'' instead of ''/appname/todo/new''. When I added the ''new'' manually, it worked. This bug only showed itself when the DB table was empty. Once you''ve got data in there, the link points to the correct URL. I guess I should''ve reported this, but I figured someone else would''ve noticed it by now. Maybe it''s already fixed in CVS. Cheers, Gavin
Hi, Is there an easy way to shutdown WEBrick on XP? Ctrl+C doesn''t seem to work, I have to press the X to close the command prompt and wait for the "end now" dialog to come up... Thanks, Abdullah
Abdullah Jibaly wrote:>Hi, > >Is there an easy way to shutdown WEBrick on XP? Ctrl+C >doesn''t seem to work, I have to press the X to close >the command prompt and wait for the "end now" dialog >to come up... > > >Thanks, >Abdullah >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > > > >Ctrl-Break ?
Abdullah Jibaly wrote:> > Hi, > > Is there an easy way to shutdown WEBrick on XP? Ctrl+C > doesn''t seem to work, I have to press the X to close > the command prompt and wait for the "end now" dialog > to come up...I don''t understand this. Ctrl+C works for me under XP. But you are the second person who has told me that its not working for them. Anyway, you could just close the command window. Curt
Ctrl+break works fine though, as Alexey suggested. --- Curt Hibbs <curt-fk6st7iWb8MAvxtiuMwx3w@public.gmane.org> wrote:> Abdullah Jibaly wrote: > > > > Hi, > > > > Is there an easy way to shutdown WEBrick on XP? > Ctrl+C > > doesn''t seem to work, I have to press the X to > close > > the command prompt and wait for the "end now" > dialog > > to come up... > > I don''t understand this. Ctrl+C works for me under > XP. But you are the > second person who has told me that its not working > for them. > > Anyway, you could just close the command window. > > Curt > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Neither Ctrl-C nor Ctrl-Break work for me. I end the task in Task Manager. Ctrl-C used to work before 0.8, so something changed. I also noticed that with 0.8 Webrick now binds by default to 127.0.0.1, which makes it inaccessible from another machine (you have to specifically bind it to the IP of the machine if you want to access it from somewhere else). On Tue, 16 Nov 2004 21:34:12 -0800 (PST), Abdullah Jibaly <amjibaly-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> * Replies will be sent through Spamex to rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > * For additional info click -> http://www.spamex.com/i/?v=4990968 > > Ctrl+break works fine though, as Alexey suggested. > > > > --- Curt Hibbs <curt-fk6st7iWb8MAvxtiuMwx3w@public.gmane.org> wrote: > > > Abdullah Jibaly wrote: > > > > > > Hi, > > > > > > Is there an easy way to shutdown WEBrick on XP? > > Ctrl+C > > > doesn''t seem to work, I have to press the X to > > close > > > the command prompt and wait for the "end now" > > dialog > > > to come up... > > > > I don''t understand this. Ctrl+C works for me under > > XP. But you are the > > second person who has told me that its not working > > for them. > > > > Anyway, you could just close the command window. > > > > Curt > > > > _______________________________________________ > > 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 >
Hi ! Webrick is often blind to these shortcuts. Sometimes It shuts down, sometimes It doesn''t. I usually have to wait some time (like 10-20s) before it really shutdowns. Removing the exception catch solves the problem but kills Webrick in a very rude way. hth, Pierre. On Wed, 17 Nov 2004 20:37:30 +1300, 3kru-hpyd-5+VhGm8TZF7QT0dZR+AlfA@public.gmane.org <3kru-hpyd-5+VhGm8TZF7QT0dZR+AlfA@public.gmane.org> wrote:> Neither Ctrl-C nor Ctrl-Break work for me. I end the task in Task > Manager. Ctrl-C used to work before 0.8, so something changed.-- Pierre Baillet <octplane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>