#105
May 12, 2008

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 (27.7 MB, 6:17)
alternative download for iPod & Apple TV (10.2 MB, 6:17)

Resources

git clone git://github.com/rails/rails.git
git pull
git checkout v2.1.0_RC1
git checkout master
rake rails:update
script/dbconsole

RSS Feed for Episode Comments 73 comments

1. Mikel Lindsaar May 12, 2008 at 00:43

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


2. James May 12, 2008 at 00:44

Woot! I'm the first!

(@_@)


3. James May 12, 2008 at 00:48

(ò_ô) What!!

@Mikel, congrats!


4. Russell Jones May 12, 2008 at 00:58

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.


5. Trevor Turk May 12, 2008 at 06:54

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


6. Ryan Bates May 12, 2008 at 07:39

@Russell, I added a link in the show notes, hopefully that will be okay.

@Trevor, you're right, good point!


7. Fred May 12, 2008 at 08:48

Why is this better than "sudo gem install rails –source http://gems.rubyonrails.com?"

An obviously non-programmer newbie.


8. Peter Jackson May 12, 2008 at 09:33

@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.

 


9. Ryan Bates May 12, 2008 at 11:51

@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.


10. Fred May 12, 2008 at 11:51

@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.


11. Mike Wyatt May 12, 2008 at 12:11

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]


12. Bjarki May 12, 2008 at 15:10

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-)


13. Abdullah May 12, 2008 at 17:46

The best feature of rails 2.1:
3 railscasts a week.. WOHOO!
go Ryan!


14. Matt May 12, 2008 at 18:12

@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.)


15. Mike Wyatt May 12, 2008 at 21:52

there's no other traces of ruby on my ststem aside from what is shipped with leopard

:(


16. Ryan Bates May 12, 2008 at 22:27

@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


17. Sam Aaron May 13, 2008 at 06:54

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 :-)


18. Sam Aaron May 13, 2008 at 06:58

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/


19. Carl May 13, 2008 at 10:11

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?


20. David May 13, 2008 at 20:05

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.


21. kino May 13, 2008 at 21:44

where can take video tutorila by GIT?


22. Peter Jackson May 19, 2008 at 07:44

@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.


23. mike wyatt May 23, 2008 at 12:31

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


24. Lance Ennen May 27, 2008 at 11:06

@Ryan thanks for the screencast!

@Trevor thanks for point out --depth 1

Thanks Steve Purcell for the new script/dbconsole!!


25. slythic Jun 02, 2008 at 15:45

@Bjarki - I agree about an image uploading tutorial. Very necessary and I think one of the last things to make this site complete. :-)


26. OA Jun 03, 2008 at 15:26

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 :)


27. Steve Purcell Jul 28, 2008 at 00:39

@Lance - you're welcome!


28. rtf Sep 05, 2008 at 02:47

@kino check out
http://www.gitcasts.com/


29. Walter Sep 20, 2008 at 14:18

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!


30. Walter Sep 23, 2008 at 12:30

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 ;)


32. Chat_ Nov 26, 2008 at 13:15

Thanks Ryan,I think this is one of the most wonderful sites. I have great admiration for you. :p


34. sohbet odaları Dec 03, 2008 at 16:21

Fantastic games. I liked them. Thank you very much

http://www.ruyaalem.net http://www.ekelebekfm.com


34. sohbet odaları Dec 07, 2008 at 23:50

<a href="http://www.yazilisohbet.net" title="çet, cet, çet odaları" target="_blank">çet</a>
<a href="http://www.yazilisohbet.net" title="sohbet, sohbet odaları" target="_blank">sohbet</a>sanke


37. bedava sohbet Dec 19, 2008 at 23:53

hello


37. indir Dec 19, 2008 at 23:53

thanls


39. Cet Dec 21, 2008 at 08:17

hello tskler http://www.sohbetli.com


39. Çet Dec 21, 2008 at 08:18

Thank you http://www.sohbetli.com


40. superalem Dec 21, 2008 at 13:04

thansk oyu.


41. Sohbet et Dec 22, 2008 at 12:43

Thanks you...


42. sohbet,chat Dec 27, 2008 at 09:11

Thanks you...


58. seviyeli sohbet Jan 11, 2009 at 18:20

thanks for the info


60. Toplist Jan 15, 2009 at 15:14

thank you for sharing..


60. cet Jan 17, 2009 at 12:24

thank you..


62. msn adresleri Mar 01, 2009 at 07:34

if you wanna me I will publish all my work which continues about 3 years. thanks for your article and being as a base of my works. www.msnliste.net


62. kale kasa Mar 08, 2009 at 06:14

The massively-multiplayer online role playing game World of Warcraft, or WoW as it is affectionately known, is a gaming experience that transcends boundaries and nations. Worldwide, there are over 8 million subscribers playing this game at this time, with player from almost every continent sharing adventures in the magical realm of Azeroth.


62. sohpet Apr 11, 2009 at 10:51

Thanks You


62. sohpet Apr 11, 2009 at 10:52

Thanks You


62. sohbet et Apr 15, 2009 at 01:25

Thanks


62. Can Dirgen Apr 23, 2009 at 01:28

Thank you Admin.
http://www.candirgen.com
http://www.indirweb.net
www.candirgen.com
www.indirweb.net


64. chinaspecial Apr 27, 2009 at 21:01

<a href="http://www.china-special.com">China Highlights</a>
<a href="http://www.china-special.com/china_highlights">China Highlights</a>
<a href="http://www.china-special.com/China_Tours.shtml">China Tours</a>
<a href="http://www.china-special.com/China_Hotels.shtml">China Hotels</a>
<a href="http://www.china-special.com/China_Attractions.shtml">China Attractions</a>
<a href="http://www.china-special.com">Beijing China Travel</a>
<a href="http://www.china-special.com">Shanghai China Travel</a>
<a href="http://www.china-special.com">Xian China Travel</a>
<a href="http://www.china-special.com">Guilin China Travel</a>
<a href="http://www.china-special.com">Yangshuo China Travel</a>
<a href="http://www.china-special.com">China custom tours</a>
<a href="http://www.china-special.com">China special tours</a>
<a href="http://www.china-special.com">China custom Travel</a>
<a href="http://www.china-special.com">China special travel</a>


65. sohpet Apr 29, 2009 at 12:11

thanks you


65. chat sitesi May 01, 2009 at 11:59

thanks admin.


66. çet May 04, 2009 at 07:20

very good ..ThankS.


68. seviyeli sohbet May 04, 2009 at 09:39

Thank you for this informative article.


68. çet May 05, 2009 at 19:54

<a title="Chat sitesi , chat" target="_blank" href="http://www.sohbetizm.net">Chat sitesi</a> <a title="sohbet odaları , chat" target="_blank" href="http://www.sohbetizm.net">sohbet odaları</a>


69. halimdiktas May 06, 2009 at 02:25

thanks


70. replica Bvlgari Bracelets May 06, 2009 at 23:32

Thank you for this informative article.


72. çet May 10, 2009 at 04:25

thank you very much


73. alpha May 15, 2009 at 18:09

<a href="http://www.uppowerleveling.com">wow power leveling</a>
<a href="http://www.uppowerleveling.com">wow power leveling</a>
<a href="http://www.uppowerleveling.com">wow powerleveling</a>
<a href="http://www.uppowerleveling.com">powerleveling</a>
<a href="http://www.uppowerleveling.com">power leveling</a>
<a href="http://www.uppowerleveling.com">wow gold</a>
<a href="http://www.uppowerleveling.com">powerleveling</a>
<a href="http://www.uppowerleveling.com">World of Warcraft power leveling</a>
<a href="http://www.up-powerleveling.com">wow power leveling</a>
<a href="http://www.uppowerleveling.com">aion powerleveling</a>
<a href="http://www.uppowerleveling.com">aion power leveling</a>
<a href="http://www.up-powerleveling.com">wow powerleveling</a>
<a href="http://www.up-powerleveling.com">powerleveling</a>
<a href="http://www.up-powerleveling.com">power leveling</a>
<a href="http://www.up-powerleveling.com">wow gold</a>
<a href="http://www.up-powerleveling.com">powerleveling</a>
<a href="http://www.up-powerleveling.com">World of Warcraft power leveling</a>
<a href="http://www.up-powerleveling.com">aion powerleveling</a>
<a href="http://www.up-powerleveling.com">aion power leveling</a>


73. Chat Sitesi May 18, 2009 at 00:24

thanks


74. Muhabbet Odaları May 18, 2009 at 00:25

thankss


75. çet May 18, 2009 at 03:47

<a href="http://www.Sohbetizm.Net" title="Sohbet istanbul, çet, Chat sitesi">çet</a>
<a href="http://www.Sohbetizm.Net" title="Sohbet istanbul, çet, Chat sitesi">Chat sitesi</a>
<a href="http://www.Sohbetizm.Net" title="Sohbet istanbul, çet, Chat sitesi">Sohbet istanbul</a> thank you very much.


77. sohbet siteleri May 30, 2009 at 08:31

thanks youu


78. çet Jun 01, 2009 at 02:41

tahks


78. kllk123 Jun 01, 2009 at 22:19

wow power leveling
wow power leveling
wow powerleveling
wow powerleveling
cheap wow powerleveling
cheap wow power leveling
powerleveling
world of warcraft power leveling
world of warcraft power leveling
power leveling
power leveling

power leveling
power level
wow power level
powerleveling
wow powerleveling
world of warcraft power leveling

Badge of Justice power leveling
Badge of Justice powerleveling
Badge of Justice powerleveling
Badge of Justice pl
WoW Badge of Justice
WoW Badge of Justice
WoW Badge of Justice powerleveling
WoW Badge of Justice powerleveling
Cheap Badge of Justice power leveling

Honor Power Leveling
Honor Power Leveling
Honor Powerleveling
Honor Powerleveling
WoW Honor Powerleveling
WoW Honor Powerleveling
WoW Honor Power Leveling
WoW Honor Power Leveling
PVP Honor Powerleveling
PVP Honor Powerleveling
Honor Points Powerleveling
Honor Points Powerleveling
Cheap Honor Powerleveling
Cheap Honor Powerleveling
Honor Power Level
Honor Power Level

AOC Powerleveling
AOC Powerleveling
AOC Power leveling
AOC Power leveling
Age of Conan Powerleveling
Age of Conan Powerleveling
Age of Conan Power leveling
Buy AOC Powerleveling
Cheap AOC Powerleveling
aion Powerleveling
buy aion Powerleveling

click here
http://www.gamesgoto.com


79. sohbet et Jun 08, 2009 at 01:30

Thanks


80. kllk1234 Jun 11, 2009 at 08:21

<a href="http://www.aionwowbuy.com">wow powerleveling</a>
<a href="http://www.aionwowbuy.com">powerleveling</a>
<a href="http://www.aionwowbuy.com">power leveling</a>
<a href="http://www.aionwowbuy.com">wow gold</a>
<a href="http://www.aionwowbuy.com">powerlevel</a>
<a href="http://www.aionwowbuy.com">World of Warcraft power leveling</a>
<a href="http://www.aionwowbuy.com">wow power lvling</a>
<a href="http://www.gamesgoto.com">wow powerleveling</a>
<a href="http://www.gamesgoto.com">powerleveling</a>
<a href="http://www.gamesgoto.com">power leveling</a>
<a href="http://www.gamesgoto.com">wow gold</a>
<a href="http://www.gamesgoto.com">powerlevel</a>
<a href="http://www.gamesgoto.com">World of Warcraft power leveling</a>



82. <a href="http://www.megasohbet.org" title="Sohbet, Sohbet Odaları, Chat" target="_blank">Chat</a> Jun 15, 2009 at 10:30

<a href="http://www.megasohbet.org" title="Sohbet, Sohbet Odaları, Chat" target="_blank">Chat</a>


83. mabel Jun 16, 2009 at 02:15

http://www.idolreplicas.com


84. mabel Jun 16, 2009 at 02:16

<a href="http://www.idolreplicas.com">replica watches</a>


85. Sohbet Muhabbet Jun 16, 2009 at 05:29

thank you very much..

http://www.flort.net


86. lida diyet Jul 02, 2009 at 03:14

Thanks to a good explanation ..

Add your comment:

(SKIP THIS ONE)

(required)

(not shown)


(use pastie or gist for code)

sponsored by:
if you want to help:
required:
Get Quicktime Player