Ruby on Rails 2.0 Preview Release
sudo gem install rails --source http://gems.rubyonrails.org
To tryout the latest and greatest version of everybody’s favourite framework (well mine anyway) just put that like of code into your terminal.
This blog post has most of the new features summed up and this Peepcode PDF goes into more detail about all the tasty new improvements.
There is so much demand for rails developers at the moment you wouldn’t believe, and with this release it’s going to make development of websites and web apps even faster and less painful.
If you haven’t tried Rails yet then this is a perfect time to get your feet wet, I’d be happy to help out anyone who isn’t sure how to get started or gets stuck on anything.
And if you are already riding the rails train then you’ll want to check out this blog post to get your apps ready for 2.0 as soon as possible!



Andrew my friend! I admire your work and you’ve persuaded me to learn Ruby on Rails! Do you think you can help this noob out?
Summer Ordoñez on October 21, 2007 7:03 pm
Sure!
Have you done any programming before?
Andrew on October 21, 2007 7:05 pm
No I have not, heh.
Summer Ordoñez on October 21, 2007 7:12 pm
So your first step is to follow this guide: http://teabass.com/super-simple-ruby-on-rails-with-macports/ to set up your development environment first of all.
Then you’ll want to have a read through all of the chapters in this tutorial: http://pine.fm/LearnToProgram/
Once you’ve done that check out this post: http://teabass.com/getting-ryan-on-rails-part-1/ and let me know when you reach this point
Andrew on October 21, 2007 8:21 pm
I’m a bit stuck on #4 of this page: http://teabass.com/super-simple-ruby-on-rails-with-macports/
Help please!
Summer Ordoñez on October 21, 2007 8:57 pm
ok so I suggest you use textmate for this, first install that from here:
Then once that is done, restart your terminal (quit it and start it again) and type this:
mate /etc/profileThat will open up a text file, you need to paste this bit of code in the bottom of it:
PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"then save the file (it may ask for a password) and restart your terminal again.
Need any more granular help than that?
Andrew on October 21, 2007 10:38 pm
Hey Andrew! I’m learning RoR by creating a simple blog however I’m stuck on adding a particular feature, if you have any spare time could you help me out?
Sasha on October 21, 2007 11:56 pm
Okay, I’ve downloaded the free trial of TextMate and restarted and typed that first part in and no text file opened :-\ Did I do something wrong?
Summer Ordoñez on October 22, 2007 4:14 am
Ok summer, try this one instead:
mate ~./profileThat first symbol is the Tilde btw
Andrew on October 22, 2007 6:59 am
Sasha, how can i help?
Andrew on October 22, 2007 7:03 am
I just type that into TextMate, right?
Summer Ordoñez on October 22, 2007 8:29 am
No, you type that in the terminal, that’s prolly where you have been going wrong!
Andrew on October 22, 2007 8:48 am
Haha yeah, well I’ve tried entering those codes into terminal and it just says command not found. Ugh, I suck! I wish you were here to show me hahaha.
Summer Ordoñez on October 22, 2007 9:04 am
Ah ok, so that means you have not installed the mate command.
If you open up Textmate and in the help menu at the top choose “Terminal Usage” and click the “Create Link” button and that will install the command.
Andrew on October 22, 2007 9:11 am
Yay! I’m done with that part. Geez, that took me all day, lol. I’ll continue in the morning Andrew! Maybe we can chat on Google Talk so it’ll be easier. Thanks for putting up with my slowness
haha.
Summer Ordoñez on October 22, 2007 9:24 am
Excellent
Andrew on October 22, 2007 9:27 am
If only I had the time, the skills, the patience, the motivation and the coffee.
From what I have seen/read RoR looks amazing.
Might pick it up one day. Got a few projects I might turn my hand to that could use it…
Tao on October 22, 2007 9:30 am
Thanks for being willing to help! Basically I want to add a dropdown-box in my admin section that will list .css files so that the admin may change the .css file used for the whole app.
I think it would work by storing the name of the file in a table of the database and then using but I’m confused as how to implement this.
Any help would be great!
Sasha on October 22, 2007 10:10 am
Ok Sasha, interesting concept
So would I would do is have a CSS model and database table with columns like name(string) and body(text) and store the css itself in the body.
For example, here is a scaffold which would create this:
script/generate scaffold_resource Css name:string body:text created_at:datetime updated_at:datetimeif your on rails 2.0 dont include _resource
then you’ll need to create some kind of preferences or admin model to store the chosen CSS design:
In your preference model:
has_one :cssIn your CSS model:
belongs_to :preferenceand then if you want to generate a dropdown menu use something like this:
< %= f.collection_select(:css_id, Css.find(:all), :id, :name, options = {:prompt => ‘Select a Style’} ) %>That should be placed within a standard form_for block in the preference form (edit/new)
Ok so that is a lot of code and not much sense, if you are still struggling with this then let me know and I’ll make you a little demo app to show you what I mean.
Andrew on October 22, 2007 10:13 pm
Thanks for your reply Andrew! I think I understand upto the part where the standard form_for comes in, I don’t think I’ve used that before and am unsure.
A demo app would be awesome! As I find it easier to learn from example, but I don’t want to use up your time if your busy.
Sasha on October 22, 2007 11:16 pm
Hey Andrew! I’m sure you’re probably asleep, but I’m ready to move onto the next step, so let this extreme noob know what to do!
Hopefully we’ll get to talk sometime. I had to evacuate my home because of fires nearby… pretty scary stuff.
Summer Ordoñez on October 23, 2007 1:06 am
Sasha, I’ll whip up a little application for you one evening this week, might even turn it into a blog post, I can see it being useful for other people as well.
Summer, I’ll write up a blogpost for you too
Andrew on October 23, 2007 4:20 pm
I really need to properly read up on RoR. Might be able to convince the boss it’s a viable alternative to ASP.net
Henry on October 23, 2007 4:40 pm
Thank you Andrew!
Summer Ordoñez on October 23, 2007 4:55 pm
Henry, as much as i consider RoR to be awesomely amazing and wonderful, I can see you having a hard time trying to get anyone to switch from asp.net to rails.
I think there is a certain mindset with .net that the whole “paying for it” brings along and that can be very hard to change.
The first company I worked for was .net and I often suggested and showed them rails but to no avail, if i was as good as i am now then it may have been different tho (I could have rewritten much of the application in my spare time)
Andrew on October 24, 2007 8:33 pm
It’s certainly a very different way of programming, the MVC model seems interesting. Not sure I quite understand it yet to be truthful. I’ve got it running on the Macbook at home and it seems fun to play with. Im gonna have a go in my own time before suggesting it to the company.
I’m pretty sure the company would be happy that it doesn’t cost a bomb tho!
Henry on October 29, 2007 10:21 am