#105 Gitting Rails 2.1 RC1
Rails 2.1 Release Candidate 1 was just released! In this episode I will show you how to install it into your Rails project.
- Download:
- mp4Full Size H.264 Video (12.7 MB)
- m4vSmaller H.264 Video (6.78 MB)
- webmFull Size VP8 Video (15.7 MB)
- ogvFull Size Theora Video (14.9 MB)
Ryan, thanks for the great episode on GIT! I was hoping you would do one like this and I wasn't disappointed.
Also, thanks to all the sponsors for the grand prize, I really didn't expect to win, but it is a lot of fun helping others and I am glad I could help and help other people learn more about rails!
Mikel
Woot! I'm the first!
(@_@)
(ò_ô) What!!
@Mikel, congrats!
Awesome episode Ryan, thanks. One note: I couldn't find the link to your contest results anywhere on your homepage, though i was able to derive it from the screenshot at the tail end of this episode.
Note that you can use the depth option in git to keep your "frozen" vendored much smaller by not downloading all of the project history:
git clone git://github.com/rails/rails.git --depth 1
@Russell, I added a link in the show notes, hopefully that will be okay.
@Trevor, you're right, good point!
Why is this better than "sudo gem install rails –source http://gems.rubyonrails.com?"
An obviously non-programmer newbie.
@Fred: There are a few reasons.
First, I'm not certain that the RC is available as a gem yet.
Even is if is, there are a couple reasons this might be better.
1. You don't want to upgrade every app running on your machine before you've had a chance to check out how the new framework will affect your code. So installing Rails into the vendor directory is a little "safer" in that it breaks one app instead of all of your apps.
2. A lot of rubyists are on shared hosts and can't run "sudo gem install" anything.
@Fred, that should work too, and I should have mentioned it. I just prefer to update an individual project through the vendor directory so I don't unintentionally update another project. At least until the final 2.1 is released.
@Peter
Thanks for the answers. Glad I asked. I'm trying to get started with Rails (working through Agile...) and hard to figure out how all the Rails and Ruby pieces fit together particularly since so many new pieces being developed: Merb, Rubinus, Passenger, Rack, Mongrel, RSpec, Mephisto etc. Trying to figure out what I need to pay attention to and what I don't.
I'm getting this error when I try to run anything like the about, console or server scripts
/Library/Ruby/Site/1.8/rubygems.rb:139:in `activate':Gem::Exception: can't activate activesupport (>= 1.4.1), already activated activesupport-2.0.991]
Nice episode as always :) I have watched all your episode and as a result I have learned a whole lot about how to develop Rails applications. I have been trying these past days to find a good tutorial on how to upload files, images to be exact :). Is it possible you could do an episode on how to do this in Rails 2.1 in the near future? I have done a little experimenting with Django and uploading images there is very simple. I have followed a few Rails examples on this but they seem out-dated and "hackish". Sorry about the long comment, keep up the excellent work. I look forward to a new episode every Monday 8-)
The best feature of rails 2.1:
3 railscasts a week.. WOHOO!
go Ryan!
@Mike
Try removing any other versions of Ruby apart from the one that ships with OS X 10.5. (The MacPorts install of Ruby was occasionally causing this conflict after I upgraded.)
there's no other traces of ruby on my ststem aside from what is shipped with leopard
:(
@Mike, interesting, I'm not familiar with that error. Perhaps post it on the mailing list along with the steps took to trigger it.
groups.google.com/group/rubyonrails-talk
Hey Ryan,
nice screencast (as always). Is there any chance you could clarify the repercussions of cloning an external git repository (as you suggest) inside a project which itself is already managed by git.?
So far I have been using braid (http://github.com/evilchelu/braid/tree/master) to pull in external git repositories (which I think links to the repositories as a submodule in a separate branch). This is mainly because I assumed there might be issues with storing git repositories within git repositories. However, I may be wrong...
Anway, suffice to say, a lot of this git stuff is still new to me, and probably a lot of other people too :-)
Oh, while on the subject of using git to pull in external repositories, this post by Graeme Mathieson might be useful to people:
http://woss.name/2008/04/09/using-git-submodules-to-track-vendorrails/
Has anyone else noticed anything odd about the sound in some of these episodes (for example this one)? I'm using Quicktime on Windows and at 5:47 seconds there is a small cutout in the sound, and if you look at the timer in the lower left hand corner it stops updating for about 2 seconds and skips to 5:50. There are a couple of other points where it does the same thing, and I've heard in it a few other railscasts, and I'm wondering if it is just my system, can anyone else verify this?
Yes, I am using submodules to track all plugins where possible. I like that it keeps a list of everything managed by git in a single .gitmodules file at the root of your main project.
@Mike:
/Library/Ruby/Site/1.8/rubygems.rb:139:in `activate':Gem::Exception: can't activate activesupport (>= 1.4.1), already activated activesupport-2.0.991]
I have run into this error frequently. Two things you can do to fix it:
1. If it is an option for you, run 'sudo gem cleanup' to clean out old versions of rails gems.
2. Look for code in your app that extends ActiveRecord. The "Oracle find_rows" patch and the Oracle "prefetch_primary_key" patch are two common culprits. Check environment.rb for anything that messes with AR.
Is your project open-source or sharable? If so, send me a pointer to your repository and I'll take a look.
for the record, I got my little problem cleared up a couple of days after-the-fact
http://rails.lighthouseapp.com/projects/8994/tickets/176-2-1_rc1-won-t-load-on-stock-leopard-setup#ticket-176-3
@Ryan thanks for the screencast!
@Trevor thanks for point out --depth 1
Thanks Steve Purcell for the new script/dbconsole!!
@Bjarki - I agree about an image uploading tutorial. Very necessary and I think one of the last things to make this site complete. :-)
An imagine uploading tutorial would be great. In fact, it would be really nice if Ryan could suggest something that would combine attachment_fu's S3 capabilities and fleximage plugin's on-the-fly imaging capabilities.
Looking forward to each and every episode as always :)
@Lance - you're welcome!
@kino check out
http://www.gitcasts.com/
Hi Ryan.
I have a problem with this episode.
I downloaded the .tar.gz from the github. Extracted it in my vendor directory.
Now I want to use the new rails to make a new rails project but ofcourse it will still use my old rails version.
Also how did you get that dbconsole script in the existing rails project by just pulling that rails dir into the vendor dir baffles me
Basically there must be some commands I'm missing...
Kind regards and keep up the excellent work!
Ok after installing the acts_as_list gem I was good to go with porting my app. Now to update my actual rails install I followed this:
http://wiki.rubyonrails.org/rails/pages/HowtoUpgrade
Now when I run rails NewCoolProject I do get the dbconsole etc...
Might help others ;)