

Rails 3.1: Release candidate - SingAlong
http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-candidate

======
gnufied
I am using Jammit for asset management and Barista for compiling coffeescript
on the fly with a Rails 3.0.7 project.

Any comparisons between Jammit and Sprocket will be welcome.

~~~
cdmwebs
So far, it looks like the only real differences are:

* jammit uses config/assets.yml, sprockets uses inline requires

* jammit loads individual files in development, sprockets concatenates

* sprockets compiles coffee with :bare => false by default. I don't know what barista's default is

~~~
nestlequ1k
for large js projects, sprockets is a nightmare. trying to add a breakpoint in
a 5,000 line javascript file is really really frustrating.

Would love to see a workaround in sprockets (to make each js file included
separately in dev mode), but until then I'd say Jammit is the way to go.

------
TomasSedovic
Kudos for bundling a simple BCrypt-based authentication.

~~~
beseku
I'm new to Rails and am currently working through the tutorial at
railstutorial.org. I'm a PHP/CodeIgniter dev so a lot of the features are new
but many concepts are familiar.

Browsing the linked GitHub code on the OP's link relating to the new
secure_password stuff - does this make the authentication code used in the
above tutorial obsolete - the commented example on GitHub indicated included
BCrypt based password storage/authentication method ... ?

~~~
mhartl
The SHA2 digest approach in the Rails Tutorial book is still the standard in
many applications and authentication plugins, and is fine for most
applications. The basic techniques you'll learn in the current 3.0 version are
still useful. That said, I am working on a new version of the book that uses
bcrypt.

------
merecat
Notice this in the new rake 0.9.0:

* _Incompatible_ _change_ : Rake DSL commands ('task', 'file', etc.) are no longer private methods in Object. If you need to call 'task :xzy' inside your class, include Rake::DSL into the class. The DSL is still available at the top level scope (via the top level object which extends Rake::DSL).

<http://github.com/jimweirich/rake/blob/master/CHANGES>

~~~
getsat
I ran into this bug today in a fresh install of the latest Rails/Rake. If your
rake tasks are currently exploding due to Rake 0.9.0, making your Rakefile
look like this will fix it:

<https://gist.github.com/4b4e24877b107b00bcba>

~~~
getsat
On second thought, don't do this. Add rake 0.8.7 to your gemfile and bundle
update. Rake 0.9.0 is insanely broken.

------
jim_h
Anybody know how easy it will be to upgrade a 3.0 Rails app to 3.1? Especially
in regards to changing it to use jQuery.

~~~
tomfakes
I just upgraded an app from 3.0.7 to 3.1.0 rc1

I use Devise and Mongo Mapper. The Mongo Mapper for Devise gem depends on
Devise 1.1.x, and this causes a bunch of deprecation warnings, but it works. I
don't know if the latest Devise has this fixed, as I can't run it due to the
Mongo Mapper for Devise dependency.

Some hand editing of development.rb to remove the debug_rjs setting and some
editing to change my use of stylesheet_tag and my app ran ok

I'm not using the cool new asset pipeline yet, but my app runs with 1 hour of
work.

~~~
websymphony
Did you just point the gemfile to newer version and did hand editing as you
went along or is there a command for the upgrade?

~~~
tomfakes
I've had trouble with Mongo Mapper and Devise.

I've upgraded Mongo Mapper to 0.9.1 to take advantage of it's Rails 3
integration, and it works with Devise 1.3.4 which removes the deprecation
warnings.

To do this, I had to pull down the devise-mongo_mapper plugin to avoid version
conflicts - it works with the newer code with no changes.

Mongo Mapper 0.9.x has a new configuration hookup that I had already written
myself, so that code had to get a small change.

Joint, a Mongo Mapper plugin, doesn't work. I was going to replace Joint
anyway for my own needs, now I need to do it today instead of next week.

Now I'm 2 hours in, and still not working on the Asset pipeline work I want to
do, but my app is running except for the Joint bits

------
jarin
Kind of a bummer that "HTTP streaming" only works with Ruby 1.9.2. I'm not
against upgrading to Ruby 1.9.2, it's just that Puppet doesn't support it yet.

------
clobber
Will this make all my latest Rails 3.0 books worthless?

~~~
aaronbrethorst
No.

edit: Your printed technical book was essentially worthless the moment you
bought it, given how fast most software evolves these days. But, I'm guessing
you mean: 'will this make my book so outdated as to be worthless in terms of
learning.'

The answer is still no. All of the major new features are, essentially,
optional, with the exception of jQuery, but hopefully you were already using
that anyway.

The Asset Pipeline, SCSS and CoffeeScript are major new features, but you'd
likely need to read up on SCSS and CoffeeScript separately anyway. The Asset
Pipeline can probably be understood with a couple good blog posts.

HTTP streaming: same thing. Also, it's—again—an optional feature.

~~~
clobber
Thanks.

I was thinking how long it took for "Agile Web Development with Rails 4th
Edition" to come out and now 3.1 is on the way. Luckily guides like
railstutorial.org update along with new Rails releases.

