hello everyone, i'm just starting out my adventure on rails with mac osx and have so far done both the rolling on rails tutorials from onLamp, and have tinkered around a bit myself playing with scaffold etc. I downloaded and printed the excellent four days on rails tutorials pdf and as excited to see that i got to have a play around with the code that the scaffold generates (as in the onLamp tutorials you don't get to see this, you just re-define aspects of it) i was also however, scared to see that it requires a different version of rails to the version i am using and wasnt sure how well it would all fare up. When i first started to get into the idea of developing ror i looke around for a nice solution to develop in, i concluded that a combination on textmate / locomotive & terminal was best. Since starting the four days on rails tutorial however, i have had nothing but problems, and am starting to think that it is in fact down to my development enviroment... So ruby on rails experts (on mac) i'm asking you this: What is the best set of tools for developing / learning ruby on rails on mac os x 10.4??? my current list: locomotive (chose for 1 click set-up) manual ruby / rails install textmate mysql 5 (point something) cocoa mysql (beta) for mysql gui safari what do you guys use? what was you learning toolset? why can't i do this bloody four days on rails tutorial? (it just wont do script/generate scaffold category on page 9) please help. Many Thanks, Craig
on 2005-12-04 17:37
on 2005-12-04 17:51
Looks like your set of tools is fine. What specific error do you get when trying to run the script/generate?
on 2005-12-04 17:58
ssmith wrote: > Looks like your set of tools is fine. > > What specific error do you get when trying to run the script/generate? well it all sort of stems from when i'm asked to force it to use the version of rails used in the manual, as far as i can tell the download of rails 0.12.1 (the version recommended in the pdf) happens fine, and i get no specific error messages when i edit the enviroment.rb So when i do that none of the model / controller generates work.... if i skip that bit the model / controller generates work fine but the generate scaffold (which acording to the pdf will reveal all of the gode generated so wew can have a play around) dosen't work at all i type the command at the terminal i'm just returned back to the command promt thing [$ruby - the account username ;) ] if my toolset and the way i've got it all set up is fine, then why can't i get this to work???
on 2005-12-04 18:15
Your choice of tools is not really causing the problem you're seeing. I suspect you're correct in that it has something to do with the version of rails (can't recall if you already had another version installed or not but it's possible there's some sort of conflict / incompatibility if you did). You may want to reinstall rails (clean) and try the tutorial you mentioned with it. If the tutorial doesn't work with this version of rails, then that would be an excellent way of learning what's changed, etc. Here's a good article that goes into the setup step-by- step (it even includes instructions on how to set up lightTPD): http://www.hivelogic.com/articles/2005/12/01/ ruby_rails_lighttpd_mysql_tiger
on 2005-12-04 19:21
On Dec 4, 2005, at 7:37 AM, craigtmackenzie wrote: > locomotive (chose for 1 click set-up) > manual ruby / rails install These are mutually exclusive. You're actually running one or the other. To get a Terminal window with all of the Locomotive paths setup, you need to launch the Terminal from within Locomotive itself. HTH.. --Steve
on 2005-12-04 20:58
so i've followed all the instructions in the link that ssmith provided and have done that, presumbaley i no should be able to run through the tutorial without any problems, one quick question how do i get the results into safari? with locomotive i could define servers/ports etc. to view projects on how would i using this method? is there some terminal command or something? or do i have to create all my rails projects in a special directory?
on 2005-12-04 21:03
When you create your rails project "rails my_project", you run script/server from the my_project dir. That will start up a server at port 3000. Pat On 12/4/05, craigtmackenzie <firstname.lastname@example.org>
on 2005-12-04 21:09
so i would get to it from: http://localhost:3000/my_project is that right? and the script/server thing does that run webrick? what is lightTPD???
on 2005-12-04 21:11
No, you'd get to it from http://localhost:3000 Yes, script/server runs webrick unless you have lighttpd installed, I think. lighttpd is a web server, like apache. www.lighttpd.net Pat On 12/4/05, craigtmackenzie <email@example.com> <firstname.lastname@example.org> <email@example.com>
on 2005-12-04 21:23
ok brilliant i'm thinking i can get on with the four days on rails thing ok now, just out of curiosity; the four days on rails tutorial uses rails 0.12.1, and i'm using 1.14.3 in the tutorial the guy runs the following rails ToDo cd ~/ToDo script/generate model category script/generate controller category [writes scaffold code into category_controller.rb] script/generate scaffold category he says that this generates his scaffold code and he can see it all and play around with it, using the same code on rails 1.14.3 results in the shell reoprting that i should set up a table in the databse or something??? anybody know how to achieve the same result (ie. revelaing all of the scaffold code so i can have a play around in it??) in 1.14.3??? many thanks
on 2005-12-04 21:48
in the tutorial should be a schema for the database, go ahead and set that up and change your database.yml to match On Dec 4, 2005, at 11:23 AM, craigtmackenzie <firstname.lastname@example.org> <email@example.com>
on 2005-12-04 22:01
oh yeah i've done that, but under 1.14.3 rails ToDo cd ~/ToDo script/generate model category script/generate controller category [writes scaffold code into category_controller.rb] script/generate scaffold category doesn't work, it just produces that error i mentioned before... where as the tutorial states it works under 1.12.1 so for my personal rail apps that i'm gonna write in 1.14.3 how am i going to get past the invisible scaffold to see the code underneath?
on 2005-12-05 04:59
On Dec 4, 2005, at 11:23 AM, craigtmackenzie wrote: > script/generate controller category > all of the scaffold code so i can have a play around in it??) in > 1.14.3??? many thanks Try: script/generate scaffold Category Category Cheers- -Ezra Z. WebMaster Yakima Herald-Republic Newspaper firstname.lastname@example.org 509-577-7732