Rails 3.1rc4 console broken after Ruby upgrade? How to reactivate / configure it?

Somehow this is connected, but I'm not sure how / why?

Just upgraded from Ruby 1.9.2-p180 to 1.9.2-p290 using the RVM rvm upgrade ... command and now my asset pipeline is broken.

During rvm upgrade ... I noticed a lot of errors for each gemset line by line:

 ERROR: Error running 'rvm gemset pristine' under , please read /Users/meltemi/.rvm/log//gemset.pristine.log 

I am continuing the update because there is not much interesting in gemset.pristine.log ... in addition, /Users/meltemi/.rvm/log//gemset.pristine.log does not exist (can not?) In this exact path? two consecutive '//' in the path? Anyway...

Testing a small application, and although it starts and starts, it does not load any assets (images, css, etc.). There are a lot of Not Found errors in the development log (see below) about these missing assets, although they exist within app/assets/images and app/assets/stylesheets , etc. ??

Does anyone know what is going on here? It looks like the pipeline has somehow broken ... As if Rails no longer knows how to look for assets in an application / assets, maybe? How can I check / verify / fix / reactivate this pipeline?

 $ rails s => Booting WEBrick => Rails 3.1.0.rc4 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2011-07-25 23:11:38] INFO WEBrick 1.3.1 [2011-07-25 23:11:38] INFO ruby 1.9.2 (2011-07-09) [x86_64-darwin10.8.0] [2011-07-25 23:11:38] INFO WEBrick::HTTPServer#start: pid=74881 port=3000 Started GET "/" for 127.0.0.1 at 2011-07-25 23:11:43 -0700 Processing by PostsController#index as HTML Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY posts.created_at DESC User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Photo Load (0.3ms) SELECT "photos".* FROM "photos" WHERE "photos"."post_id" = 6 CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Photo Load (0.2ms) SELECT "photos".* FROM "photos" WHERE "photos"."post_id" = 5 CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Photo Load (0.2ms) SELECT "photos".* FROM "photos" WHERE "photos"."post_id" = 4 CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Photo Load (0.2ms) SELECT "photos".* FROM "photos" WHERE "photos"."post_id" = 2 CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Photo Load (0.2ms) SELECT "photos".* FROM "photos" WHERE "photos"."post_id" = 1 Rendered posts/index.html.haml within layouts/application (3016.4ms) Rendered layouts/_header.html.haml (9.7ms) Completed 200 OK in 3143ms (Views: 3138.2ms | ActiveRecord: 2.9ms) Started GET "/assets/application.css" for 127.0.0.1 at 2011-07-25 23:11:47 -0700 Served asset /application.css - 404 Not Found (1ms) ActionController::RoutingError (No route matches [GET] "/assets/application.css"): Rendered /Users/meltemi/.rvm/gems/ ruby-1.9.2-p290@rails3 /gems/actionpack-3.1.0.rc4/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.2ms) Started GET "/assets/application.js" for 127.0.0.1 at 2011-07-25 23:11:47 -0700 Served asset /application.js - 404 Not Found (0ms) ActionController::RoutingError (No route matches [GET] "/assets/application.js"): Rendered /Users/meltemi/.rvm/gems/ ruby-1.9.2-p290@rails3 /gems/actionpack-3.1.0.rc4/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms) Started GET "/assets/racer-outline.png" for 127.0.0.1 at 2011-07-25 23:11:48 -0700 Served asset /racer-outline.png - 404 Not Found (0ms) ActionController::RoutingError (No route matches [GET] "/assets/racer-outline.png"): Rendered /Users/meltemi/.rvm/gems/ ruby-1.9.2-p290@rails3 /gems/actionpack-3.1.0.rc4/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (3.2ms) Started GET "/assets/ray.png" for 127.0.0.1 at 2011-07-25 23:11:48 -0700 Served asset /pogo.png - 404 Not Found (0ms) ActionController::RoutingError (No route matches [GET] "/assets/ray.png"): Rendered /Users/meltemi/.rvm/gems/ ruby-1.9.2-p290@rails3 /gems/actionpack-3.1.0.rc4/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.2ms) 
+2
source share
2 answers

In the end, I just blew out the entire problematic gemset and started again. Lesson learned:

Do not trust rvm upgrade . Install the new Ruby w / in RVM. Then manually rebuild (or bundle install ) your gems.

0
source

It looks like version 2.0.0. Beta of stars has broken the asset pipeline. Enter

gem 'sprockets',' = 2.0.0.b.10.10

into your Gemfile seems to fix the problem (this worked for me). Rails seems to automatically use the latest beta for some reason, so if you just recently started your project or updated all your gems, it probably broke it.

Please note that this information is initially not mine, I received a fix from http://groups.google.com/group/rubyonrails-core/browse_thread/thread/59d8c7813b4d1bbe?pli=1

He explains the problem for the ver. 2.0.0.b.11, but I used ver. 2.0.0.b.12 with the same results, so it seems that they have not fixed it yet.

EDIT: It seems that upgrading your rails to 3.1.rc5 also fixes the problem.

+3
source

All Articles