Rails 2.0.2: Some new defaults and a few fixes

Posted by David December 17, 2007 @ 02:47 PM

Now that we have the big Rails 2.0 release out the door, it’s a lot easier to push out smaller updates more frequently. So that’s what we’re going to do. Rails 2.0.2 contains a bunch of smaller fixes to various bugs, no show-stopping action, just further polish. But it also contains a few new defaults.

SQLite3 is the new default database

Most importantly is SQLite3 as the new database we’ll configure for by default when you run the rails generation command without any specification. This change comes as SQLite3 is simply an easier out of the box experience than MySQL. There’s no fussing with GRANTs and creates, the database is just there. This is especially so under OS X 10.5 Leopard, which ships with SQLite3 and the driver gems preinstalled as part of the development kit.

If you want to preconfigure your database for MySQL (or any of the other adapters), you simply do “rails -d mysql myapp” and everything is the same as before. But if you’re just playing with a new application or building a smallish internal tool, then I strongly recommend having a look at SQLite3. Thanks to the agnostic db/schema.rb, it’s as easy as changing your config/database.yml to switch from SQLite3 to MySQL (or another database) as soon as your load warrants it.

Don’t check for template changes in production mode

New applications will be generated with the following option in their config/environments/production.rb:

config.action_view.cache_template_loading = true

This will stop Rails from constantly doing STAT calls to the file system to check if the file has changed. This can make for a lot of I/O activity, especially if you have lots of partials. If you have very fast disks, this may not matter, but if you’re running off slower disks it can make quite a big difference.

The drawback is that you can no longer just svnup a single template file and see it changed immediately. You’ll have to restart the application servers to make that happen.

Regardless, we feel that this is the better default in a partial-heavy world, but you’re of course always free to change it.

Rails 2.0.2 is a drop-in replacement for Rails 2.0

To upgrade, just do “gem install rails” (if the gems are still not propagated, use—source http://gems.rubyonrails.org) or use the new rel_2-0-2 tag.

The rest of the changes are as follows:

Action Pack

  • Added delete_via_redirect and put_via_redirect to integration testing #10497 [philodespotos]
  • Allow headers[‘Accept’] to be set by hand when calling xml_http_request #10461 [BMorearty]
  • Added OPTIONS to list of default accepted HTTP methods #10449 [holoway]
  • Added option to pass proc to ActionController::Base.asset_host for maximum configurability #10521 [chuyeow]. Example:

    ActionController::Base.asset_host = Proc.new { |source| if source.starts_with?(’/images’) “http://images.example.com” else “http://assets.example.com” end }

  • Fixed that ActionView#file_exists? would be incorrect if @first_render is set #10569 [dbussink]
  • Added that Array#to_param calls to_param on all it’s elements #10473 [brandon]
  • Ensure asset cache directories are automatically created. #10337 [Josh Peek, Cheah Chu Yeow]
  • render :xml and :json preserve custom content types. #10388 [jmettraux, Cheah Chu Yeow]
  • Refactor Action View template handlers. #10437, #10455 [Josh Peek]
  • Fix DoubleRenderError message and leave out mention of returning false from filters. Closes #10380 [Frederick Cheung]
  • Clean up some cruft around ActionController::Base#head. Closes #10417 [ssoroka]

Active Record

  • Ensure optimistic locking handles nil #lock_version values properly. Closes #10510 [rick]
  • Make the Fixtures Test::Unit enhancements more supporting for double-loaded test cases. Closes #10379 [brynary]
  • Fix that validates_acceptance_of still works for non-existent tables (useful for bootstrapping new databases). Closes #10474 [hasmanyjosh]
  • Ensure that the :uniq option for has_many :through associations retains the order. #10463 [remvee]
  • Base.exists? doesn’t rescue exceptions to avoid hiding SQL errors. #10458 [Michael Klishin]
  • Documentation: Active Record exceptions, destroy_all and delete_all. #10444, #10447 [Michael Klishin]

Active Resource

  • Added more specific exceptions for 400, 401, and 403 (all descending from ClientError so existing rescues will work) #10326 [trek]
  • Correct empty response handling. #10445 [seangeo]

Active Support

  • Ruby 1.9 compatibility. #1689, #10466, #10468 [Cheah Chu Yeow, Pratik Naik, Jeremy Kemper]
  • TimeZone#to_s uses UTC rather than GMT. #1689 [Cheah Chu Yeow]
  • Refactor of Hash#symbolize_keys! to use Hash#replace. Closes #10420 [ReinH]
  • Fix HashWithIndifferentAccess#to_options! so it doesn’t clear the options hash. Closes #10419 [ReinH]

Rails

  • Changed the default database from mysql to sqlite3, so now running “rails myapp” will have a config/database.yml that’s setup for SQLite3 (which in OS X Leopard is installed by default, so is the gem, so everything Just Works with no database configuration at all). To get a Rails application preconfigured for MySQL, just run “rails -d mysql myapp” [DHH]
  • Turned on ActionView::Base.cache_template_loading by default in config/environments/production.rb to prevent file system stat calls for every template loading to see if it changed (this means that you have to restart the application to see template changes in production mode) [DHH]
  • Introduce `rake secret` to output a crytographically secure secret key for use with cookie sessions #10363 [revans]
  • Fixed that local database creation should consider 127.0.0.1 local #9026 [parcelbrat]
  • Fixed that functional tests generated for scaffolds should use fixture calls instead of hard-coded IDs #10435 [boone]
  • Added db:migrate:redo and db:migrate:reset for rerunning existing migrations #10431, #10432 [matt]
  • RAILS_GEM_VERSION may be double-quoted also. #10443 [James Cox]
  • Update rails:freeze:gems to work with RubyGems 0.9.5. [Jeremy Kemper]

Posted in Releases | 100 comments

Comments

  1. crayz on 17 Dec 15:52:

    Thanks for disabling the template checking by default. The way capistrano deploys new code, reloading changes in the view (but not the model/controller) can cause errors in the brief time between the update & mongrel restart

  2. Anthony Green on 17 Dec 16:10:

    I’m getting a (OpenURI::HTTPError) for activesupport 2.0.2.

  3. loµis on 17 Dec 16:10:

    This is great,but dont forget a problem with mongrel on win32.i cant install it.

  4. Yaphi on 17 Dec 16:17:

    I am getting the same error as Anthony Green running Leopard with Rails 2.0.1 installed. I am running:

    sudo gem install rails -y—source\ http://gems.rubyonrails.org

  5. Alex on 17 Dec 17:40:

    I had some trouble installing rails 2.0.2. using the gems.rubyonrails.org server. rails 2.0.2 installed, but the component parts didn’t and i had to rollback. This is on 10.5

  6. IanZ on 17 Dec 18:11:

    Same error as Anthony/Yahpi.

    C:\rails>gem install rails—source http://gems.rubyonrails.org Select which gem to install for your platform (i386-mswin32) 1. rails 2.0.2 () 2. rails 2.0.1 (ruby) 3. rails 2.0.0 (ruby) 4. rails 1.99.1 (ruby) 5. Skip this gem 6. Cancel installation > 1 Install required dependency activesupport? [Yn] Select which gem to install for your platform (i386-mswin32) 1. activesupport 2.0.2 () 2. Skip this gem 3. Cancel installation > 1 ERROR: While executing gem … (OpenURI::HTTPError) 404 Not Found

  7. Edgar J. Suarez on 17 Dec 18:21:

    Yep… same as Anthony and Yaphi. On Winsucks

  8. Mark A. Richman on 17 Dec 18:40:

    Same error for me on Win32 as well.

  9. JohnW on 17 Dec 18:55:

    This worked for me (after failing before):

    1) Update gem to 0.95

    gem update—system

    2) Install rails 2.0.2

    gem install rails—source http://gems.rubyonrails.org

  10. Anthony Green on 17 Dec 19:45:

    JohnW’s suggestion does the trick

  11. Don Park on 17 Dec 19:55:

    having sqlite3 as the default database is great! it should make the first rails experience much simpler and more likely to succeed!

  12. Walter Horstman on 17 Dec 20:09:

    Just found out that form_for doesn’t handle path prefixes. Is this true? So in config/routes.rb I have “map.resources :blogs, :path_prefix => ’:role’” and in view I use “form_for @blog”, but I need to specify the :url parameter, requiring me to write quite an amount of code.

  13. Walter Horstman on 17 Dec 20:11:

    By the way, I probably should have posted my last post somewhere else, but don’t really know where. Sorry for that.

  14. Yaphi on 17 Dec 21:04:

    Thanks JohnW that worked fine

  15. Bala Paranj on 17 Dec 21:42:

    Walter: I have nested routes and my form_for looks like:

    form_for([:admin, @episode]) do |f|

    You could try something similar.

  16. Trevor Smith trevor_smith1@btconnect.com on 17 Dec 21:53:

    I’m currently in the process of designing and building a commercial site in the uk. and trying to evaluate which framework to use. Does Ruby on Rails 2.0 have better support for MYSQL stored procedures than the previous versions? Can rails now retrieve multiple result sets and handle the MYSQL IN/ OUT parameters? Reading the internet forums, the previous versions required a code fix to enable stored procedure support – not something I would rely on with a commercial site! I would appreciate your response ASAP as I have tight deadlines and need to decide ASAP as work is due to start soon.

  17. Bill Judd on 17 Dec 21:56:

    Thanks for all the great work!

    One minor documentation issue: the rails online help text shows “mysql” as the -d default… should be “sqlite3”??

  18. Andrew Fitzgerald on 17 Dec 23:26:

    I get:

    ERROR: While executing gem … (Gem::RemoteFetcher::FetchError) OpenURI::HTTPError: 404 Not Found reading http://gems.rubyforge.org/gems/activesupport-2.0.2-.gem

    Why is the extra hyphen on the end of 2.0.2? I have latest gem, on OS X Leopard.

  19. Edgar J. Suarez on 17 Dec 23:43:

    Yeah, that worked. Thanks JohnW

  20. bug on 17 Dec 23:57:

    The install problem is documented at http://dev.rubyonrails.org/ticket/10541 as of 3 hours ago, apparently. It is necessary to specify the http://gems.rubyonrails.org as the source because the gem specification for the rubyforge server failed to provide a target.

  21. Olli on 18 Dec 00:12:

    uhm my rhtml files don’t work anymore :( it seems it’s caused by the template handler refactoring.

  22. Olli on 18 Dec 00:21:

    ha! and i ignored that rhtml wars deprecated :)

  23. jc on 18 Dec 00:21:

    Man… rubyforge is turning into a disaster Been 404ing ever since 2.0.1 came out. Rails works with the specified gem server, but other gems like haml and several other constantly give 404 errors. If you try it enough though it works though.

  24. Donal Ellis on 18 Dec 00:38:

    Yep, I’ve got Leopard and getting exactly the same error as Andrew Fitzgerald.

  25. Nick on 18 Dec 00:44:

    Seems as though the mirrors aren’t sync’ing properly.

    It would really help if a list of active mirrors were listed somewhere.

  26. Olli on 18 Dec 00:49:

    I got a error: ActionView::TemplateError (undefined method `new’ for erb) in admin/index.html.erb: ....

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:513:in `delegate_compile'

    does anyone know whats wrong with my rails?

  27. Adam Greene on 18 Dec 00:54:

    I’ve got a problem. I installed the new Rails 2.0.2, but when I try to run the site, it keeps telling me :

    ActionView::TemplateError (undefined method `new’ for erb) in welcome/i ndex.html.erb: in `delegate_compile’

    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:513:
  28. caker on 18 Dec 01:10:

    I’m so happy to the default database from mysql to sqlite3, easy to test some features of rails, cool! thanks !!!

  29. Adam Greene on 18 Dec 01:26:

    I think I know what this error is:

    ActionView::TemplateError (undefined method `new’ for erb) in welcome/i ndex.html.erb: in `delegate_compile’

    I think it originates in Markaby because of lines 4-10 in rails.rb in Markaby.

  30. Adam Greene on 18 Dec 01:41:

    Yep, the fix for markaby is replace line 8 in rails.rb with:

    compile_and_render_template(@@template_handlers[template_extension.to_sym], template, file_path, local_assigns)

    Or maybe the problem is a regression in Rails? I’m not sure. I will post this to What and let you guys duke it out.

  31. Anonymous Coward on 18 Dec 01:56:

    My dear core team,

    I love rails, and appreciate the contributions and hard work you are all doing.

    Unfortunately it seems that yet once again people are having a ton of problems installing a new rails release due to some problem with the release itself or with rubyforge code/mirroring/etc.

    Why is it that the core team seems to have a fire and forget mentality with releases? It seems you are throwing them over the wall and leaving the users to find and clean up the mess that is often made.

    Look through the comments for every release in the last year and I would wager at least half of them are full of comments mentioning initial install problems, rubyforge sync issues, missing dependencies, etc.

    It has been promised by Koz in the past that any releases would be done at night and that the blog posts announcing the release would not be put out for general release until the core team had tested for themselves that the release actually worked.

    Is it so hard to add this as a hard verification step for every release of rails? Couldn’t you automate the install of new releases to verify that they go through clean? Can you promise us that you won’t drag us all through the install problems until you have followed through and tested that it actually works by installing it using automated tests or on your own machine the same way that the rest of us do?

    If its a RubyForge problem that is the root cause where is their response to this ongoing chronic problem?

    To compound the problem, there appears to be an issue with rubygems 0.9.5 which now reports ‘—source’ as an invalid option for install even though the help still shows it as a valid option: ERROR: While executing gem … (OptionParser::InvalidOption) invalid option: -—source 0.9.5

    sudo gem --version

    Don’t you think that we could use some polish with the gem release and install system as well as with rails? Frustrated…

    Thanks for listening.

  32. nap on 18 Dec 04:12:

    Great read man, thanks for sharing your insights!

  33. mikehc on 18 Dec 05:01:

    I have several usies installing this. They were fixed by updated rubygems to its last version.

    gem update—system

    (write it, don’t copy, check the double – )

    and then installing the new rails

    gem install—source http://gems.rubyonrails.org

    (write it, don’t copy, check the double – )

  34. Andrew Fitzgerald on 18 Dec 05:41:

    Ok, I got it working:

    sudo gem update—system

    (this is a space between update and the TWO dashes) it’s not one word, it’s update (SPACE) DASH DASH update.

    same thing for rails:

    sudo gem update rails—source http://gems.rubyonrails.org

    (there’s a space between rails and the TWO – (dashes)

    That’s what was messing me up, the space. Hope this helps.

  35. NegatLov on 18 Dec 06:33:

    I have update…thanks

  36. Jim on 18 Dec 07:34:

    Not connecting to sqlite3 -

    I upgraded Rails to 2.0.2 on Leopard – Actually, I ended up uninstalling ruby, gem, rails and reinstalling them Right now I have actionmailer (2.0.2) actionpack (2.0.2) activerecord (2.0.2) activeresource (2.0.2) activesupport (2.0.2) rails (2.0.2) rake (0.7.3) rubygems-update (0.9.5)

    and I also have the following relevant ports for sqlite

    rb-sqlite @2.2.2 ruby/rb-sqlite rb-sqlite3 @1.2.1 ruby/rb-sqlite3

    yet- I keep getting an error no such file to load—sqlite3

    /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’ /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’ /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require’ /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in’ /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require’ /opt/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’ /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’

    things are a little bit different when I switch to MySql but I am looking for the simpler easier out of the box experience advertised. Any pointers welcome!!

  37. Fjan on 18 Dec 09:27:

    @ Anonymous Coward:

    I am not convinced the install problems are as serious as you claim, nor do I think that the Rails team can do much about them.

    There are thousands of people using rails on a large variety of platforms, a few dozen people with install problems are to be expected. A simple “sudo gem update” worked fine for me, as I guess it did for many people, and very few of those will bother to post their experience here. The fact that most of people posting here are experiencing install problems is only to be expected.

    A ‘how to update rails’ FAQ wouldn’t be a bad idea though, since most of the installers seem to have the same problems with each release (gems not yet propagated, gem system not updated, gem system assuming wrong platform, how to recover after first incorrect update borked your gems, etc)

  38. fgege on 18 Dec 09:32:

    Why do I need a living database connection even for the start page? What if I don’t want to use a database? (I know it’s a rare case, but beginners often are like this) I’m just writing a course material about Rails and I see that the install section will be enormous (yes, because of all these problems). Maybe it’s needed to wait until 2.1? I agree with Anonymous Coward on testing more by the core team. Rails like this is loosing it’s shine and the marketing about here-is-no-frustrating doesn’t seem to be true any more.

  39. Joerg on 18 Dec 09:43:

    Functional tests, where I have defined a setup method

    def setup super login_as :quentin end

    Are no longer working. Setup itself is no longer being called ….

  40. John Topley on 18 Dec 11:01:

    Joerg, see http://www.quotedprintable.com/2007/12/5/potential-gotcha-with-test-setup-in-rails-2-0

  41. loµis on 18 Dec 11:10:

    i get this problem when i want migrate

    rake aborted! no such file to load—action_web_service (See full trace by running task with—trace)

    i cant start webrick too…. :S

  42. Piotr Andrzej Nowak on 18 Dec 11:22:

    Rails 2.0 needs definitely a new AWDWR, to much changes, please don’t tell that these are minor changes. its 2.0, to much things are broken.

    cheers.

  43. Olli on 18 Dec 11:26:

    @Adam Greene Thank you very much for the little fix :) cheers

  44. Shinya Kasatani on 18 Dec 11:38:

    Joerg, I also had a problem with functional test upgrading from 2.0.1 to 2.0.2. I’ve written a patch, so please review and vote for it if you can: http://dev.rubyonrails.org/ticket/10536

  45. Skyblaze on 18 Dec 12:37:

    Dave thomoas has just released the beta version of the pickaxe 3 and he said that for now he isn’t planning to release a new AWDVWR…even if all the community wants it

  46. Eleo on 18 Dec 15:23:

    Maybe it’s because Rails is changing so rapidly it’s hard to keep up with. Which is good (more features, better performance) and bad (tutorials go out of date too fast).

  47. Bill Judd on 18 Dec 15:32:

    @Jim

    I had the same problem and discovered I needed to install the Sqlite3 gem.

    List your local gems to see the gems that are installed locally:

    $ gem list

    If you don’t aee something like: sqlite3-ruby (1.2.1)

    in your list then type: $ sudo gem install sqlite3-ruby

    Hope this helps!

  48. Stefano on 18 Dec 15:49:

    I found that i also needed to run a sudo gem update after the sudo gem update—system and the sudo gem update rails—source http://gems.rubyonrails.org ..

  49. Jim on 18 Dec 16:31:

    @Bill Judd

    Thanks Bill! – that did it – I guess I should have searched in gems.rubyonrails.org to find the exact name of the gem – I had tried to install sqlite3 via gem but was not using the proper name

  50. robert on 18 Dec 17:44:

    Hi. I’m having trouble getting past my co’s firewall. Is there anyway to download the full rails package as a zip and install it w/o having to access it remotely via GEM? Can I download the zip and install it locally with GEM? I tried doing that with several variations of options on the GEM command line but none seem to work.

  51. zazzle on 18 Dec 19:16:

    What a mess. I was fumbling around like a mad person. This was painful.

    I had to realize the—source needed updating. I had to do a gem update—system. Then rake was mucked up, so I had to do that. Then when I updated, I wasn’t prompted again for the various dependencies packages, so I had no idea if they were even installed (turns out they had been, but…hey, a message would be nice!).

    Anyway… I think it’s updated now. Oh, wait, I just read that I should have sqlite installed now, too… that’s yet another step that’s missing. Crap on a lemon tart!

    ‘To upgrade, just do “gem install rails”’, indeed. :(

    -z

  52. zazzle on 18 Dec 19:32:

    I’m seriously about to give up entirely… :\

    zaz@ishtar:~/Projects$ sudo gem install sqlite3-ruby Building native extensions. This could take a while… ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension.

    I mean, a basic Ubuntu distro install. Nothing fancy here, and not an obscure distro, either. I don’t get how so many things are as screwed up as they apparently are. I’m certainly appreciative of all the work that DID go into the new release and the updates, but the upgrading/updating procedure really needs more testing and general documentation.

  53. zazzle on 18 Dec 21:11:

    ok, finally solved. It appears I had no previous SQLite stuff installed on the machine at all. I went about adding packages via package manager (using Gutsy). I’m no longer sure which sqlite3 packages made things work, but it was after the last additions of the command-line sqlite3 stuff and the sqlite3 source (-dev package) that I could finally ‘sudo gem -install sqlite3-ruby’ w/o error.

    Perhaps a note in some docs somewhere, I dunno. I admit that this isn’t necessarily a problem with Rails or the update, but it seems entirely possible that people might not grok where the problem lies when you say the update is a drop-in replacement that “just works”.

    Hope this helps someone. :)

  54. Grumpy on 18 Dec 21:57:

    Listen, guys, I certainly understand Rails releases suck, it goes with the territory even.

    But seriously, what the eff, if you’re unable to even work through the INSTALL process, man idk, just think about that for a minute…

  55. Joris Machielse on 18 Dec 23:38:

    Why did you add SQLite as the default db? I understand you find it a better “out of the box experience” and I can override it easily, but shouldn’t Rails default to the most common db setup (MySQL)?

    I really appreciate the opinionatedness in Rails (it has brought a lot of joy in my life), but perhaps you’re going (a small) one step too far, here?

    Cheers!

    Joris

  56. Hannes on 19 Dec 00:12:

    Hint for Debian users: sudo apt-get install libsqlite3-ruby

    If you want to play with SQLite3. ;-)

  57. Hannes on 19 Dec 00:21:

    Uhm, another question. Just hacked a little scaffolding thing:

    /script/generate scaffold Post title:string body:text

    The default values for “New post” (textarea, input) are now “NULL”. How can we prevent this? Guess this has todo with sqlite3 defaults.

    CREATE TABLE posts (“id” INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, “title” varchar(255) DEFAULT NULL, “body” text DEFAULT NULL, “created_at” datetime DEFAULT NULL, “updated_at” datetime DEFAULT NULL);

    I have in mind that this wasn’t that kind before. Am I wrong?

  58. Elise on 19 Dec 01:02:

    Wow! SQLite3! I can’t contain my glee!

    Time to look at Merb or Nitro.

  59. Rohit on 19 Dec 01:58:

    Any resolution on the mongrel/Win32 issue?

    I get the following when starting up mongrel:

    c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re quire’: no such file to load—c:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0 .3.2-x86-mswin32-60/lib/mongrel_service/init.rb (MissingSourceFile)

    Thanks!

  60. Eleo on 19 Dec 02:33:

    It seems like Rails 2.0.2 doesn’t install (at least on windows) without Rubygems 0.9.5, but when I updated Rubygems I noticed mongrel was no longer working! I don’t know if it’s the fault of mongrel or Rubygems, but I’ll just stick with Rubygems 0.9.4 and Rails 2.0.1 until the issue is resolved some way or another.

  61. cmscentral on 19 Dec 03:23:

    I’m really liking the SQLite3! This actually makes so many things so much easier for me. :-)

  62. Andre on 19 Dec 04:07:

    Hi I m a newbie on rails and ruby. Will it be possible in future to have development database in mysql and production using another like oracle ?

    i have problem in installation, i m using rubygems 0.9.2 and cannot update it to 0.9.5 and cannot install rails 2.0.2 having the same issues as everybody here. on my development i use netbeans, it has rails 1.2.6 and development is easy on it. For testing i m preparing an ubuntu, installing ruby 1.8 and rubygems 0.9.2, about to install rails 2.0.2 there. Havent prepared a production though.

  63. Mark Wilden on 19 Dec 04:20:

    After gem update—system, I was able to gem update rails -y normally (I didn’t have to specify—source). After this, all my tests still passed. Guess I don’t have a very interesting app.

    ///ark

  64. Christian Romney on 19 Dec 04:35:

    @ Elise, Merb and Nitro are great. But since you obviously didn’t read the post thought you might like to know Sqlite3 is just the default option. Rails still supports MySQL, Postgres,Oracle, SQL Server, etc.

  65. Ryan A. on 19 Dec 05:43:

    Thanks guys on the test setup heads up :)

  66. Andre on 19 Dec 07:17:

    May I know the idea between choosing sqlite as the default database ?

    http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems

    after seeing this page, i think sqlite dont have as many features as mysql.

    n suddenly the gem update—system works for 0.9.2, tq all

  67. Falk Pauser on 19 Dec 08:05:

    Nice Update!

  68. Vlad on 19 Dec 10:14:

    activeresource-2.0.2 gem is still broken ???

    sudo gem install activeresource -r -v 2.0.2—source http://gems.rubyonrails.org Select which gem to install for your platform (universal-darwin9.0) 1. activeresource 2.0.2 () 2. activeresource 2.0.2 () 3. Skip this gem 4. Cancel installation > 1 ERROR: While executing gem … (OpenURI::HTTPError) 404 Not Found

    sudo gem install activeresource -r -v 2.0.1—source http://gems.rubyonrails.org Successfully installed activeresource-2.0.1 Installing ri documentation for activeresource-2.0.1… Installing RDoc documentation for activeresource-2.0.1…

  69. Charlies on 20 Dec 06:13:

    It doesn’t makes senses to take effort to download/setup/learn mysql to make rails up and running at the first trial. Especially, when you know you don’t need it eventually.

    I agree to have SQLite for startup default.

  70. Joerg on 20 Dec 09:33:

    @Shinya: Cool – your patch worked … my setup method is being called again. Thanks for that.

  71. Matthew Kennedy on 20 Dec 22:44:

    Would be nice to see the Screencasts & presentations page updated! love the work….. “there’s a good energy in the site!”

  72. Anton on 21 Dec 12:47:

    After executing:

    gem install mysql Updating metadata for 13 gems from http://gems.rubyforge.org ............. complete Successfully installed mysql-2.7.3-x86-mswin32 1 gem installed Installing ri documentation for mysql-2.7.3-x86-mswin32… Installing RDoc documentation for mysql-2.7.3-x86-mswin32… ERROR: While generating documentation for mysql-2.7.3-x86-mswin32 ... MESSAGE: Unhandled special: Special: type=17, text=”<!—$Id: README.html, v 1.20 2006-12-20 05:31:52 tommy Exp $—>” ... RDOC args: -op C:/Program Files/ruby/lib/ruby/gems/1.8/doc/mysql-2.7.3-x86 mswin32/rdoc—exclude ext—main README—quiet ext README docs/README.html (continuing with the rest of the installation)

    But I still get:

    WARNING: You’re using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).

  73. David D on 21 Dec 19:38:

    Detail: the help text needs to be updated.

    davidd$ rails -v Rails 2.0.2

    davidd$ rails Usage: /usr/bin/rails /path/to/your/app [options]

    Options: -r,—ruby=path Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path). Default: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -d,—database=name Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite2/sqlite3). Default: mysql

  74. MarcelloDL on 22 Dec 03:33:

    getting to rails 2 was easy enough on debian etch. Had to add ruby-debug update gem system. The apps required only one line change since 1.2.5, for the new session store, plus of course rake updating plugins and JS/scripts.

    I understand people complaining if they have problems. I don’t understand people bashing sqlite. It probably all boils down to populate a default database.yml, why all the fuss? I run postgres and mysql and find the former much better for a newbie, so for a default config, than mysql. Docs on site are better, no headaches with different storage engines, more predictable, nicer text shell. If sqlite hasn’t enough features i’d try postgres and ferret. YMMV.

  75. brb on 22 Dec 07:36:

    When upgrading any gem(s) (rails included), I suggest trying the ‘gem install xxxx’ using your old system gems,then if the gem install fails, do ‘gem update—system’. Some gems install better with old system, some with new, so always try the old before updating your gem system, that way you can try both. I’d also get into the habit of making a ‘gems_off’ gem archive for gems that have worked for you in the past because sometimes updates are flawed. Rails 2 has been a perfect transition and great performance increase. Thanks Rails team! Awesome work.

  76. Jeff on 22 Dec 22:10:

    @Elise

    Yes! Changing to Merb or Nitro would be much easier than changing 4 or 5 lines of default configuration!

  77. Dom on 22 Dec 23:47:

    Frankly I’m amazed that the change for the default database to Sqlite3 is considered in a point release! I don’t tend read about the point releases, I just do an update every now and then, and expect a bunch of bugs to be fixed. I certainly don’t expect the default behavior to change so drastically!

    I think with all of the books and tutorial information out there supporting this excellent framework – you owe it to the authors and the community at large not to change stuff like this in a point release. The resultant behavior will cause endless frustration for those following these guides.

    I’m all for opinionated, but come-on guys this is just stinks of a brash cowboy attitude with little regard for the established community.

  78. Gar on 26 Dec 15:29:

    The SQLite change was a bad idea. Most of the tools we use are MySQL-based. Instead of changing the default, why not create a separate simplified install for users who need a simpler database?

    Gar

  79. Yar on 26 Dec 23:20:

    RE: sqlite3 and windows installs -

    rake fails – complains about not finding sqlite3.dll…

    Getting the sqlite3dll*.zip from the sqlite, and dumping the *.dll and *.def (needed?) file into my ruby/bin fixes that.

    Is there a better way to take care of this for win-doze machines?

  80. JMoney on 27 Dec 06:56:

    Yes, could we please get an answer on the reason for the switch to SQLite as the default DB? MySQL has always been cake to setup. Just seems like a bizarre move to make for a point release. I can dig the “opinionated software” concept, but this change (for the sake of change?) seems a bit amateurish.

    Just looking for a sign that the project maintainers still have their heads on straight and are continuing to be pragmatic.

    Thanks.

  81. Jonas Hartmann on 28 Dec 19:51:

    The switch to SQLLite is really good.

    Every complainer should really get his hands on migrations that are there since for sure since 1.2+ (before I don’t know)

  82. Mo Rashed on 29 Dec 03:20:

    Hi there,

    First of all thanks to you all who helped creating this awesome framework and the ones that keep supporting it.

    I’ve been using rails for about two months now and I love it. But I need to get some things of my chess:

    I’ve been noticing that more and more people leave comments behind lately demanding all kind of stuff, yelling boo at the people who work their asses off to create an awesome framework. They dedicate their spare time to keep this framework alive and kicking….and what do they get back: a bunch of babies complaining and crying about the smallest stupidest things (in this example the “OHMG why did you change the default db whiteout asking permission from me first” attitude)...... I mean come on people, have a bit off respect , start acting like grown ups and say thank to the hand that feeds you!

    Just my 2 cents.

    PS: Sorry for my bad English

  83. dedy on 31 Dec 01:27:

    i want to download RoR , thanks

  84. no_thanks on 31 Dec 22:57:

    http://www.zedshaw.com/rants/rails_is_a_ghetto.html

    Awesome

  85. Dom on 02 Jan 14:26:

    @Mo: I never expected my permission be requested, merely an explanation behind the motivation of changing the default behavior in a point release such as 2.0.2. This practice would only normally occur in a major release such as 2.0.0.

    Of course we are grateful to the committers on this framework – that goes without saying – but at the same time, they have a responsibility to the community they created. In creating this community they spawned an entire industry who rely on this framework in generating their income. I am among this community.

    No it’s not a big deal that I now have to specify mySQL as the database – but like I said – why wasn’t this released in V2.0.0 – it just stinks of a last minute decision, and I wonder how many more of these have occurred and will occur in the future?

  86. Phil Thompson on 02 Jan 16:48:

    This is just my opinion. I don’t have any inside knowledge.

    Why SQLite? No setup required. You can start creating Rails apps straightaway. I’m an experienced Rails developer but there are plenty of people just getting into it. Rails has alway been about accessibility to the beginner. If someone just wants to have a play to see what Rails is like then not having to setup a database is one more reason to try it.

    There are plenty of people using other databases. Postgres is another popular one for example. Having SQLite as the default stops any “xSQL is the best database why is it not the default?” arguments. Rails is about sensible defaults.

    Not everything gets into a particular release major or otherwise and I expect we’ll see a few more additions to 2.0 version yet. That’s the beauty of iterative development!

  87. paul on 03 Jan 19:26:

    I’ve updated to 2.0.2, rubygem version 1.0.1 and receive the following error when starting WEBrick (running ms vista business)

    C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:319:in `activate’: can’t activate activerecord (= 1.15.6), already activated activerecord-2.0.2] (Gem::Exception)

    Can anyone help? I haven’t found anything googling. Thanks.

  88. ritchie on 04 Jan 19:59:

    I like the decision for the new def database, it’s a lot simpler indeed. thx for the great work btw.

  89. SamB on 05 Jan 05:56:

    New to Ruby on Rails. Is there a complete source of information for new people how to install Ruby on Rails ?. It’s not the info I find is so bad, just I find myself lost at points and not find info I could use.

  90. Mo Rashed on 07 Jan 02:21:

    @SamB:

    If you’re on a mac, you can try to install Locomotive…or you can search the mailinglist.

    Railsforum.com is a site I often use btw, maybey you can find your answers overthere

  91. Vanderdecken on 09 Jan 23:31:

    What idiots!

    Come on, for once lets have a release where everything does not break evertything that exsists out here!

    Who was the moron who thought changing the default from Mysql was a good thing?

    Your morons are turning ROR into PASCAL, another useless piece of turd programming.

    All i wanted to do was install my app on a new computer. Just install new rails, copy old code and nothing works now.

    Thanks for nothing. Thanks for Ruining Rails for real programmers in real jobs.

  92. Jeremy Kemper on 10 Jan 00:10:

    What an appallingly rotten attitude, Vanderdecken. You’ll be missed, I’m sure.

  93. LOLlaby on 10 Jan 23:13:

    Hi Van-der-dicken. If you are a real programmer with a real job you are stealing your pay, else you would have seen deprecation warning all over the logs in the last year(s) and known about freezing your rails version so that not even a comma needs to be changed.

    And about changing default database: LOL! Old apps need no change, new apps must edit the config file anyway. Is changing one single word in a config file too much of a hassle? Poor little fingers of yours.

  94. Stanislav Bozhkov on 11 Jan 10:42:

    I really can’t make it to use action_web_service with Rails 2.0.2 . ActiveResource is superb , however it doesn’t fit nice with my application and implementing a pingback service. Is there a version of action_web_service to work with the latest version of Rails or can you offer me something. Thank you in advance?

  95. MarcelloDL on 11 Jan 12:11:

    I recall something being said in the rails 2.0 announcement, however this looks promising: http://www.texperts.com/2007/12/21/using-action-web-service-with-rails-20/

    I suggest looking for help in rails user forums, instead of commenting the rails 2.0.x release. Here we are mostly trolls bashing whatever new decision DHH came up with :)

  96. brb on 11 Jan 21:27:

    RESTART YOUR COMPUTER PAUL, FOR “C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:319:in `activate’: can’t activate activerecord (= 1.15.6), already activated activerecord-2.0.2] (Gem::Exception)” WORKED FOR ME.

  97. jontec on 12 Jan 13:19:

    Personally, I find the change to sqlite and the necessity of d mysql annoying. Also, I can see why the “point release” argument is valid. Past that, I can honestly say that I learned MySQL for Rails a little over a year ago. This last point is what everyone is upset about: most of the community is used to using MySQL. I have no statistics, but I’d say that the Rails community is unique in that, as far as defaults go, we follow them to the letter. Before the release, we probably had at least 50-75% of users running MySQL in some facet of their project cycle. If this is true, it probably upset a lot of people- the default was changed to accommodate the incoming population. I’m thinking that the developers most likely didn’t make this calculation and underestimated the impact. It may have been better received with more warning… as we had with cookies.

    But guys, what’s done is done, and I certainly don’t forsee the devs reversing a default change: that would look very bad. Let’s just make our necessary changes (:D make a sh script for -d mysql).

  98. lefish on 12 Jan 15:45:

    Rails is a ghetto?

  99. sms on 13 Jan 20:19:

    Thanks for this good work!

  100. sdfg on 16 Jan 08:18:

    dfgdf