We've been waiting for this one. Thank you Ryan! P.S.: What a nice episode number ;)
Episode 200 and Rails 3 falling at the same time.. coincidence? I think not!
congrats with your 200th!
Keep up the good work, cheers!
Congratulations and thank you! That's all I've to say after 200 enlightening episodes.
Cheers on episode 200.
I think it would have been a scary coincidence if it were episode 300 ;-)
Keep them coming tho!!
As a note:
rails generate scaffold game name:string
can also be shortened by calling
rails g scaffold game name:string
Gratz on the 200th episode.
Congratulations with #200 and thank you so much for all these wonderful explanations! Keep going, I love it!
Happy #200 screencast! Thank you so much Ryan! Your tutorials are the best! [And thank you to Asciicasts too!]
Congratulations Ryan! Thanks for providing such a great resource for us all.
You can also segregate and use gems(ets) to install / manage your rails3 project, for example:
http://gist.github.com/296055
~Wayne
Congratulations for your AWESOME work along this 200 episodes. Thank you very much Ryan!!!
Congratulations on episode 200 :D I've learned allot through your episodes! :) Amazing work
Thanks Ryan and well done on reaching 200! You're making a huge contribution.
I've been using RVM and I think it's a great idea to manage "Rubies" this way.
Thanks for the 'cast
Congrats Ryan on 200 episodes! Most shows never hit 100… 200 is legendary!
It is Fantastic that a Rails 3 intro is episode 200! Any thoughts about the adoption of Ruby 1.9 or updating plugins/gems for Rails 3? It seems a little stagnant… why is that?
I've set up RVM just last week because of the same reason you mentioned in your Railscast.
Congratulations for your 200th episode and thank you for all your hard work. I'll keep donating back to the open source community and am looking forward to see more Rails 3 magic in the upcoming episodes.
Thanks,
Attila
Just installed RVM and it's great. Conveniently solved my problems following installing ruby 1.9.1 onto my development machine that hosts applications I am not ready yet to migrate.
Happy #200 episodes Ryan !
thanks for your amazing railscats, the best RoR resources ever !
Congrats on 200! I love your work, and look forward to new videos pop up in my reader.
Regarding the Window's comment in the railscast. If you would like to manage multiple versions of ruby on windows please use pik which is an excellent windows tool by Gordon Thiesfeld. You can find it on Github at
http://github.com/vertiginous/pik
~Wayne
What a coincidence !!! 200th episode comes out with rials 3. I always appreciate what you have given to the community.
Congrats on episode 200, and know that your call to give back is going beyond rails as well :)
You've helped us all out.
This is great. Thanks Ryan.
I am wondering how would I switch back or downgrade to rails 2.3.4?
Thanks.
All the junk in the stderr output in the terminal is a known issue (it's not for debugging). You can get rid of it if you follow the direction here: http://bit.ly/bNiLrS
Ryan, congratulations on episode 200! Thanks a lot for your great work. I do appreciate it!
Jeremy Kemper said:
Rails 3 will definitely prefer Ruby 1.9.2.
If you’re running 1.9, I’d recommend building 1.9.2dev rather than using 1.9.1. It’s big upgrade, it has quite a few behavior changes, and Rails master is developed against 1.9.2 exclusively (though we do continuous integration against 1.9.1 for good measure).
The key to *requiring* 1.9.2 is full mysql-ruby, pg, and sqlite3-ruby encoding support. These database drivers have had ages to upgrade but still aren’t up to snuff. Pitch in, make it happen, and you’ll find the database-backed web app world one step behind you.
@George, if you are using rvm as I show in this episode you can simply switch back to your older version of Ruby and it will use the older version of Rails.
Also specifying the rails version in your config/environment.rb (for 2.3 projects) will work so you can easily juggle multiple Rails apps with multiple versions.
@Nicholas, thanks for the link on fixing the stderr output!
@Hussein, thanks for the corrections and update! It is good to know 1.9.2 is receiving more focus.
Is it alright to use sudo before gem install/upgrade, provided I'm using the version of ruby I had prior to using rvm? Without it, it installs gems in ~/.gem.
Thank you for this nice episode, and for the forthcoming ones. Didn't know about rvm, it's a lifechanger!
Notes about rubygems:
1. You forgot the rake dependency:
gem install rake
2. you may hit upon the following error:
ERROR: Error installing bundler:
bundler requires RubyGems version >= 1.3.5
Then you can fix this with:
gem install rubygems-update
update_rubygems
gem install bundler
Everything should be fine then.
Also, related to the load of output and bundler error one may see when running rails commands inside a rails application, it's likely to be related to bundler.
There are some instructions about how to get rid of them:
http://www.ozmox.com/2010/02/07/fixing-rails-3-beta-invalid-gemspec-format-errors/
The proposed fix and some variants of it have made their ways into several bundler forks on github, so one may expect to install a new release of bundler soon I guess :)
To install on OSX, this is missing two bugfix things you need to do. If you don't, you'll get an error like:
<pre>readline.c:703: error: 'filename_completion_function' undeclared (first use in this function)</pre>
1. instead of rvm install 1.8.7 or 1.9.1, run:
CPPFLAGS="-DHAVE_RL_FILENAME_COMPLETION_FUNCTION -DHAVE_RL_USERNAME_COMPLETION_FUNCTION -DHAVE_RL_COMPLETION_MATCHES" rvm install 1.8.7
(or 1.9.1 or whatever)
2. after you run <pre>rvm 1.8.7</pre> and before you go to install the rails beta gem, run:
gem sources -r http://gems.rubyonrails.org
... for whatever reason, their gemserver is really old and not compatible. It's on github anyway.
Ryan, you can use "git clone --depth=1" unless full git history log is needed
Thank you for this new awesome cast ryan !
But maybe you could help me with my problem :
I installed rvm, ruby-19.1 and all rubygems (tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n) without any trouble.
But when I want to install rails 3 I got this issue below.
I'm using this command :
gem install rails --pre --debug -r --http-proxy http://127.0.0.1:9666
(I'm using a proxy because i'm living in China and I cannot access directly to http://gems.rubyforge.org/ from few months. So usually when I install a new gem, i use a proxy or I download directly the gem from the web)
the trace :
Exception `Gem::Package::FormatError' at /home/Acer-fredo/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:110 - No metadata found!
Exception `Gem::InstallError' at /home/Acer-fredo/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:121 - invalid gem format for /home/Acer-fredo/.rvm/gems/ruby-1.9.1-p378/cache/activesupport-3.0.0.beta.gem
ERROR: Error installing rails:
invalid gem format for /home/Acer-fredo/.rvm/gems/ruby-1.9.1-p378/cache/activesupport-3.0.0.beta.gem
Probably it comes from my proxy problem, but i'm not sure.
Do you have an idea or do you know where I can directly download rails-3.0.0 gems ?
Thanks.
#200, yey! Ryan, I think you should give some badges, images or buttons, etc, so more people help you promote the "Give back to open source" campaign in their sites!
@Doug, it depends on how your system Ruby is set up, but most likely you will want to use "sudo" with that, yes.
@jdv, rvm updated rubygems and rake for me when I did the install which is why I did not cover that here. I'm guessing this is a recent change.
@fred, you can clone Rails 3 directly from GitHub instead of installing as a gem. I'm not sure how to fix the proxy error, sorry.
@Gustavo, thanks for the suggestion. Feel free to grab the ribbon and badge I use on this site.
If anyone has any hang-ups with rack-mount, this is my experience:
gem install rack-mount now installs version 0.5.0 instead of 0.4.5... not sure why that should be a problem, but when i tried to install rails --pre, i got this:
ERROR: Error installing rails:
actionpack requires rack-mount (~> 0.4.0, runtime)
I don't think rvm contributed to these problems, but i got this error after installing 1.8.7-p248 with rvm (I had installed p249 but that gave some errors when trying to install any version of Rails, so I reverted to p248 after reading that had fixed someone's problems with Rails 3). Now I still get segfaults for gem installs sometimes, then they work for no apparent reason the next time I try. That seems to be a minor issue with rvm that I can live with.
I noticed that this screencast worked with rack-mount 0.4.5. So, after uninstalling rack-mount, I tried:
gem install rack-mount --version=0.4.5
This worked the second time (after a segfault the first time).
Then I tried once more:
gem install rails --pre
And after waiting a few minutes with nothing happening...
7 gems installed
rails -v
Rails 3.0.0.beta
@fred zingg
For what it's worth, I'm in China too and have no problem accessing ruby gems from the command line without a proxy. Youtube, Vimeo, and Danwei, on the other hand...
Thanks a million for these screencasts. As always very informative and interesting.
Keep up the good work my friend.
For those wondering about Ruby 1.9.1 vs 1.9.2. Rails 3 does support Ruby 1.9.1 but recommends 1.9.2. Since the latter is not yet released and I had some difficulties with it, I am showing 1.9.1 here.
@steve, right, I ran into the rack-mount dependency issue this morning as well. It will be fixed soon by a new release of Rails 3 beta gem.
@steve, thank you for this info, I was pretty sure the china's great firewall do not block gems.rubyforge.org, but the fact is I only cannot access this one. In my browser I cannot open http://gems.rubyforge.org/yaml if I don't use a proxy. No problem with others gem website.
@bryan, thank you for the github link. But I still I have a problem :
I downloaded sources then build and install every packages (actionpack, activerecord, etc...), then rails rails-3.0.0.beta1. Everything seems ok, but when I run my app with rails server, it says it cannot find rails sources in gems dir. And after checking I cannot find sources in rails-3.0.0.beta1 gem dir. So maybe I did something wrong during installation.
Another question, what's the best place at the moment to talk about rails 3 install problem ?
Thnx for the Tutorial Ryan!
I have a small problem when I try to use postgresql...
I always get the following error when trying to start my server:
gem install activerecord-postgresql-adapter
But this gem doesn't exist and I installed the pg gem...
Do you know what could be the problem?
Thanx!
@Jelle Vandebeeck & Nicolas Marchildon
Just require the gem in your Gemfile and sources should be handled at the same time. No need to let Rubygems handle the source =)
Hi!
Excelent work Ryan!
Congratulations for the 200th episode
Currently, `gem install rails --pre` doesn't work as it cannot pull non-pre dependencies. There is a gem called 'rails3b' which you can gem install to get around this.
Thanks for all the screencasts Ryan. Its been an excellent effort, Appreciate it.
@fred zingg: For real-time help i'd suggest using irc (freenode.net, #rubyonrails) - not knowing if irc-access to freenode is "censured". But have a look at http://rubyonrails.org/community
Thanks for yet another great episode Ryan! Congrats on #200!!!
For anyone who is installing on Ubuntu 9.10, (and using 1.9.1, per the video) you might have to do what I did to get things going:
after you install rvm, but before doing anything else, do
rvm openssl
This might require other packages (like curl), so go get those. If you don't do this, everything in the install of rails 3.0.0beta will seem to be fine until you go to test your app, and the server will get errors about openssl being missing. (I also had to install sqlite3-ruby, but that's likely because I don't have it installed by default in my non rvm world). I think building ruby and possibly rails looks for the presence of openssl, and builds accordingly, so if you don't ensure it's installed before getting ruby 1.9.1, you will have to start over from scratch by removing the .rvm directory and following the video instructions from the beginning.
Some of the issues I've seen using rvm and ruby 1.9.2 on Mac OSX 10.5.8 - the first is a permissions issue where the .gem/cache directory has system and not <USER> (whoever you log in as) as the owner - chown /R .gem <USER>:staff .gem did the trick for me.
Second issue is a big crash in using 1.9.2-preview which is the default 1.9.2 install in rvm - doing rvm install ruby-1.9.2-head is reported to fix this: see https://rails.lighthouseapp.com/projects/8994/tickets/3669-ruby-192-and-rails-30pre-aborts-on-scriptgenerate
Belated congratulations!
I only wish all screencasts were as well made. :-)
THANK YOU!!!
Anybody getting "warning: already initialized …" messages while running some commands will want to take a look at http://github.com/carlhuda/bundler/issues/issue/51/ - but basically the fix is just to do "rvm implode" and reinstall RVM from GitHub.
Hi Ryan,
Congrats on 200 episodes.
I am trying to follow the Railscast on WinXP, with a fresh install of 1.9.1 and rails 3 beta.
When I try to start the server with "rails server" in the root directory of the topscore app I get:
C:/Ruby19/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta/bin/rails:2: command not found: C:/topscore/script/rails
C:/Ruby19/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta/bin/rails:2:in `exec': No such file or directory - C:/topscore/script/rails (Errno::ENOENT) from C:/Ruby19/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta/bin/rails:2:
in `<top (required)>'
from C:/Ruby19/bin/rails:19:in `load'
from C:/Ruby19/bin/rails:19:in `<main>'
I think this is saying that the 'rails' script in the topscore/scripts directory cannot be found, the file does exist. Although it has no file extention.
Any one got any idea why it's not working?
Coach catches people's eyes.people expect to see new items of Gcoach bags, while the classic items are still hot, like coach purses .
http://bagworlds.com/
I can't get gems to update on ruby 1.3.7 or 1.9.1 - I always get this error:
ERROR: While executing gem ... (Errno::EEXIST)
File exists - C:
Can't find anything online to fix it.
In case someone else has the same problem - I can get away with installing gems in radrails







