[ANN] Rails 0.6.5 (AR 0.9.4, AP 0.8.0): Release of Contributors!

I gather that most people are now familar with the RoR suite, so I'm skipping the formal introductions and will just bring you the meat.

Get it all from http://www.rubyonrails.org, talk it up on #rubyonrails (FreeNet).

Or even easier, just do "gem install rails" -- you'll automatically install all the newest versions of the required dependencies.

Rails 0.6.5: Release of Contributors!

···

=====================================

This release is dedicated to all massive influx of patches from people like Scott Baron, Kevin Radloff, Jeremy Kemper, Dave Steinberg, and others that has put Rails on the fast track to maturity.

The GEM version now works with Windows and I fixed some issues with the mod_ruby and fcgi dispatches. Also a few other minor fixes and of course the inclusion of AP 0.8.0 and AR 0.9.4.

Also, unless you’re interested in running Edge Rails, the official recommendation for how to install Rails, and keep it up to date, is through RubyGems. So if you're just starting out, then "Gem Rails" is what you want to install.

* No longer specifies a template for rdoc, so it'll use whatever is default (you can change it in the rakefile)

* The new_model generator will now use the same rules for plural wordings as Active Record (so Category will give categories, not categorys) [Kevin Radloff]

* dispatch.fcgi now sets FCGI_PURE_RUBY to true to ensure that it's the Ruby version that's loaded [danp]

* Made the GEM work with Windows

* Fixed bug where mod_ruby would "forget" the load paths added when switching between controllers

* PostgreSQL are now supported for the automated production => test database dropping [Kevin Radloff]

* Errors thrown by the dispatcher are now properly handled in FCGI.

* Upgraded to Action Pack 0.8.0 (lots and lots and lots of fixes)

* Upgraded to Active Record 0.9.4 (a bunch of fixes)

Action Pack 0.8.0: Collection selects, sending files, fixes!

This is a major release containing the highest number of fixes and minor additions yet. There’s three new collection selects for making it easier to do drop-down selects on Active Record objects, there’s a new command for sending files with all the header voodoo necessary for IE, and then there’s a ton of minor fixes.

* Added select, collection_select, and country_select to make it easier for Active Records to set attributes through drop-down lists of options. Example:

     <%= select "person", "gender", %w( Male Female ) %>

   ...would give the following:

     <select name="person[gender]" id="person_gender"><option>Male</option><option>Female</option></

* Added an option for getting multiple values on a single form name into an array instead of having the last one overwrite. This is especially useful for groups of checkboxes, which can now be written as:

     <input type="checkbox" name="rights" value="CREATE" />
     <input type="checkbox" name="rights" value="UPDATE" />
     <input type="checkbox" name="rights" value="DELETE" />

   ...and retrieved in the controller action with:

     @params["rights"] # => [ "CREATE", "UPDATE", "DELETE" ]

The old behavior (where the last one wins, "DELETE" in the example) is still available. Just don't add "" to the end of the name. [Scott Baron]

* Added send_file which uses the new render_text block acceptance to make it feasible to send large files. The files is sent with a bunch of voodoo HTTP headers required to get arbitrary files to download as expected in as many browsers as possible (eg, IE hacks). Example:

   def play_movie
     send_file "/movies/that_movie.avi"
   end

   [Jeremy Kemper]

* render_text now accepts a block for deferred rendering. Useful for streaming large files, displaying
   a “please wait” message during a complex search, etc. Streaming example:

     render_text do |response|
       File.open(path, 'rb') do |file|
         while buf = file.read(1024)
           print buf
         end
       end
     end

   [Jeremy Kemper]

* Added a new Tag Helper that can generate generic tags programmatically insted of through HTML. Example:

     tag("br", "clear" => "all") => <br clear="all" />

   ...that's usually not terribly interesting (unless you have a lot of options already in a hash), but it gives way for more specific tags, like the new form tag:

     form_tag({ :controller => "weblog", :action => "update" }, { :multipart => "true", "style" => "width: 200px"}) =>
       <form action="/weblog/update" enctype="multipart/formdata" style="width: 200px">

   There's even a "pretty" version for people who don't like to open tags in code and close them in HTML:

     <%= start_form_tag :action => "update" %>
       # all the input fields
     <%= end_form_tag %>

   (end_form_tag just returns "</form>")

* The selected parameter in options_for_select may now also an array of values to be selected when using a multiple select. Example:

     options_for_select([ "VISA", "Mastercard", "Discover" ], ["VISA", "Discover"]) =>
       <option

VISA</option>\n<option>Mastercard</option>\n<option Discover</option>

   [Scott Baron]

* Changed the URL rewriter so controller_prefix and action_prefix can be used in isolation. You can now do:

     url_for(:controller_prefix => "clients")

   ...or:

     url_for(:action_prefix => "category/messages")

   Neither would have worked in isolation before (:controller_prefix required a :controller and :action_prefix required an :action)

* Started process of a cleaner separation between Action Controller and ERb-based Action Views by introducing an abstract base class for views. And Amita adapter could be fitted in more easily now.

* The date helper methods date_select and datetime_select now also use the field error wrapping (div with class fieldWithErrors by default).

* The date helper methods date_select and datetime_select can now discard selects

* Added option on AbstractTemplate to specify a different field error wrapping. Example:

     ActionView::AbstractTemplate.field_error_proc = Proc.new do |html, instance>
       "<p>#{instance.method_name + instance.error_message}</p><div style='background-color: red'>#{html}</div>"
     end

   ...would give the following on a Post#title (text field) error:

     <p>Title can't be empty</p>
     <div style='background-color: red'>
       <input id="post_title" name="post[title]" size="30" type="text" value="Hello World" />
     </div>

* The UrlHelper methods url_for and link_to will now by default only return paths, not complete URIs. That should make it easier to fit a Rails application behind a proxy or load-balancer. You can overwrite this by passing :only_path => false as part of the options. [Suggested by U235]

* Fixed bug with having your own layout for use with scaffolding [Kevin Radloff]

* Fixed bug where redirect_to_path didn't append the port on non-standard ports [dhawkins]

* Scaffolding plays nicely with single-table inheritance (LoadErrors are caught) [Jeremy Kemper]

* Scaffolding plays nice with plural models like Category/categories [Jeremy Kemper]

* Fixed missing suffix appending in scaffolding [Kevin Radloff]

Active Record 0.9.4: Bunch of Small Things

This release contains a bunch of smaller fixes and improvements, such as escaping of plings in YAML content, ids passed to find and find_on_conditions are now automatically sanitized, and has_and_belongs_to_many now accepts an :order key to determine in which order the collection is returned.

* Added static method for instantly updating a record

* Treat decimal and numeric as Ruby floats [Andreas Schwartz]

* Treat chars as Ruby strings (fixes problem for Action Pack form helpers too)

* Removed debugging output accidently left in (which would screw web applications)

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services

NO!!!!!!!!!!!!!! I just lost my entire rails application. I had originally
installed Rails by hand, but wanted to move over to using Gem per the
recommendation. I went to the Rail's wiki and read what to do. But when I ran

  rails /complete/path/to/my/rails/app

The first thing it did was

  rm -rf /complete/path/to/my/rails/app

Bye-bye. And I hadn't made a backup yet. Very bad! I relly need to setup an
automated backup. Well there goes another weeks worth of work --I don't know
of any way of undeleting those files. Can I curse now?

So I thought I'd let you all know, just FYI. David you might want to have
rails check for old files. I take it I don't have to run the 'rails' command
after a 'gem update' in the future.

Sadly,
T.

···

On Friday 20 August 2004 01:08 pm, David Heinemeier Hansson wrote:

I gather that most people are now familar with the RoR suite, so I'm
skipping the formal introductions and will just bring you the meat.

Get it all from http://www.rubyonrails.org, talk it up on #rubyonrails
(FreeNet).

Or even easier, just do "gem install rails" -- you'll automatically
install all the newest versions of the required dependencies.

Cool! Time for some learning...

Are we going to see a slowdown in new versions, now that you set the contributors free? :wink:

Sam

David Heinemeier Hansson <david@loudthinking.com> writes:

Or even easier, just do "gem install rails" -- you'll automatically
install all the newest versions of the required dependencies.

Any chance for a .rpa package soon?

Massimiliano

* David Heinemeier Hansson <david@loudthinking.com> [2004-08-21 02:08:51 +0900]:

Get it all from http://www.rubyonrails.org, talk it up on #rubyonrails
(FreeNet).

I haven't been able to download the config video at nextangle
for two days. Is the site down or is it just my connection.

···

--
Jim Freeze

Bye-bye. And I hadn't made a backup yet. Very bad! I relly need to setup an
automated backup. Well there goes another weeks worth of work --I don't know
of any way of undeleting those files. Can I curse now?

Uargh. I'm terribly sorry to hear of your loss. I've instantly updated the Gem Rails page with a strict warning. For future prevention, I'd recommend using CVS/Subversion even for local projects.

So I thought I'd let you all know, just FYI. David you might want to have
rails check for old files. I take it I don't have to run the 'rails' command
after a 'gem update' in the future.

You would be correct. The Rails command is only for creating new, empty applications.

I'll have a look at upgrading the rails command for the next release.

Again, I'm very sorry for your loss. I hate rework myself.

···

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services

NO!!!!!!!!!!!!!! I just lost my entire rails application. I had originally
installed Rails by hand, but wanted to move over to using Gem per the
recommendation. I went to the Rail's wiki and read what to do. But when I ran

  rails /complete/path/to/my/rails/app

The first thing it did was

  rm -rf /complete/path/to/my/rails/app

quite honestly i think this shouldnt be there. why delete the
directory? in the rare cases where its cool with the user to delete it,
its better to let the user do that by hand.. no?

T. Onoma wrote:

Bye-bye. And I hadn't made a backup yet. Very bad! I relly need to setup an automated backup. Well there goes another weeks worth of work --I don't know of any way of undeleting those files. Can I curse now?

Maybe this URL will be of help:

http://recover.sourceforge.net/linux/

Sadly,
T.

Regards,
Florian Gross

You currently have rails 0.6.0-1 in the repos.

I didn't update rails itself right away cause I was fearing another short
release cycle :stuck_out_tongue: (and frankly, packaging rails in a kinda FSS compliant
way takes a substantial amount of time) -- actionpack and activerecord
are up-to-date though.

At the time being, there are some issues concerning both the RPA port
and the gem package... I fixed several problems from the upstream sources
while packaging but OTOH I might have introduced new ones in my patches.

Therefore, the safest way to install Rails right now is just using the tgz
and copying your rails dir. It will remain so for a while until the Rails
codebase is cleaned to remove nasty dependencies on the directory layout.

···

On Sun, Aug 22, 2004 at 09:40:45PM +0900, Massimiliano Mirra - bard wrote:

David Heinemeier Hansson <david@loudthinking.com> writes:

> Or even easier, just do "gem install rails" -- you'll automatically
> install all the newest versions of the required dependencies.

Any chance for a .rpa package soon?

--
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Perhaps calling it new_rails would be better (like new_model, etc.)?

···

On Friday 20 August 2004 03:21 pm, David Heinemeier Hansson wrote:

You would be correct. The Rails command is only for creating new, empty
applications.

--
T.

  rm -rf /complete/path/to/my/rails/app

quite honestly i think this shouldnt be there. why delete the
directory? in the rare cases where its cool with the user to delete it,
its better to let the user do that by hand.. no?

It's because it's just using the same Rake command as I were using myself to generate the "old" Rails distributions. Definitely in need of improvement. Will do. Soon. Yes.

···

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services

Thanks, I checked it out. Unfortunately I'm using reiserfs, so there isn't any
reasonable way to do it.

I just need to get a versioning/backup solution in place. Any recommendations?

···

On Friday 20 August 2004 05:25 pm, Florian Gross wrote:

Maybe this URL will be of help:

http://recover.sourceforge.net/linux/

--
T.

T. Onoma wrote:

I just need to get a versioning/backup solution in place. Any
recommendations?

For versioning, CVS. Then backup your local CVS repository (and any other
files you want backed up) using rsync. Here's a good web page:

I have a bash script that uses rsync to keep 7 snapshots of all the files in
all my /home directories. The script runs (thanks to cron) every morning at
4:10AM. It's saved me a bunch of work several times.

I'm fond of subversion for versioning, and rsnapshot for backup and
mirroring.

···

On Sun, Aug 22, 2004 at 05:59:51AM +0900, T. Onoma wrote:

On Friday 20 August 2004 05:25 pm, Florian Gross wrote:
> Maybe this URL will be of help:
>
> http://recover.sourceforge.net/linux/

Thanks, I checked it out. Unfortunately I'm using reiserfs, so there isn't any
reasonable way to do it.

I just need to get a versioning/backup solution in place. Any recommendations?

"T. Onoma" <transami@runbox.com> writes:

I just need to get a versioning/backup solution in place. Any
recommendations?

For versioning, I migrated my stuff from CVS to darcs. Interesting
features (e.g. being able to commit separately changes related to
different things, disallow commits if a test suite doesn't pass, go
back to the last version where tests passed, nice way to handle e-mail
commits, automatic tracking of patches between dependencies, need only
a web server to publish a repository...), takes five minutes to set
up, and stays out of your way. I just wish I'd done it sooner.

Massimiliano

T. Onoma wrote:

···

On Friday 20 August 2004 05:25 pm, Florian Gross wrote:

Maybe this URL will be of help:

http://recover.sourceforge.net/linux/

Thanks, I checked it out. Unfortunately I'm using reiserfs, so there isn't any reasonable way to do it.

I just need to get a versioning/backup solution in place. Any recommendations?

I'm using RBackup for my backups :wink:

http://www.ntecs.de/blog/Blog/RBackup.rdoc

Regards,

   Michael

Thanks Massimiliano!!!

···

On Sunday 22 August 2004 08:35 am, Massimiliano Mirra - bard wrote:

For versioning, I migrated my stuff from CVS to darcs. Interesting
features (e.g. being able to commit separately changes related to
different things, disallow commits if a test suite doesn't pass, go
back to the last version where tests passed, nice way to handle e-mail
commits, automatic tracking of patches between dependencies, need only
a web server to publish a repository...), takes five minutes to set
up, and stays out of your way. I just wish I'd done it sooner.

--
T.