Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Runtime Error when entering rails console, bundle install failing at libv8

On the "Generating the Devise Views" part of the tutorial, when I attempt to enter the rails console to edit User.first, it fails due to a runtime error:

C:3:in `rescue in execute_if_updated': Rails::Application::RoutesReloader#execut
e_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rail
s::Application::RoutesReloader:0x4cd38e0 @paths=["C:/Sites/projects/treebook/con
fig/routes.rb"], @route_sets=[#<ActionDispatch::Routing::RouteSet:0x4cd3868>]> (
RuntimeError)

When I try bundle install or update, it fails at gem libv8.

I am using Rails v4.0.0

Has anyone else experienced this?

Can you post the error you get when bundle update fails at libv8?

Hm... Bundle update worked today, so that's good.

It then gave me an error telling me to add:

config.secret_key = '4ae77f29142df14d70eeafcb758e4ac753bc30717028507fd07692763 e66ac9cf5d504d1f93ee5ff50fe0a41c19a65b43c76f51497bac9f80348259cb49db767'

to the Devise initializer, which I did.

Then, at the next attempt to enter rails console, I received:

C:3:in `rescue in execute_if_updated': Rails::Application::RoutesReloader#execut e_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rail s::Application::RoutesReloader:0x4f64328 @paths=["C:/Sites/projects/treebook/con fig/routes.rb"], @route_sets=[#<ActionDispatch::Routing::RouteSet:0x4f642e0>]> ( RuntimeError)

this is the input of my routes.rb file:

Treebook::Application.routes.draw do devise_for :users resources :statuses root to: 'statuses#index'

1 Answer

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Kyle Broyles you're probably experiencing an incompatibility between rails 4.0 and devise. Double check that the version of devise works with the version of Rails you are running and give it another shot.

Thanks, Jason. You were definitely right.

I changed the devise entry in the gemfile to:

gem 'devise', '3.0.0.rc'

But I had already spent so much time borking it by trying solutions I found in other forums, that I am now getting all kinds of other errors. I just want to delete all of devise and start over from that step (I might even have to start the whole series over.) Sad face.

Do you have any other suggestions?

If you've been using git to keep track of changes, you can roll back to a previous commit.

Ah, of course. That's what I'll do.

Thanks!

I used git reset hard HEAD, and it told me that that HEAD was now at the 'Added bootstrap and applied the layout page.' So I went from the beginning of the 'Creating an Authentication System' stage, being sure to add Devise 3.0.0.rc because it is supposed to be compatible with Rails 4.

Hm... Now I can't migrate the database in the "Generating the User Model" step.

rake aborted! Rails::Application::RoutesReloader#execute_if_updated delegated to updater.execute_if _updated, but updater is nil: #<Rails::Application::RoutesReloader:0x4dc1a80 @paths=[ "C:/Sites/projects/treebook/config/routes.rb"], @route_sets=[#<ActionDispatch::Routin g::RouteSet:0x4dc1a38>]> C:3:in rescue in execute_if_updated' C:65535:inexecute_if_updated' C:/Sites/projects/treebook/config/environment.rb:5:in `<top (required)>' Tasks: TOP => db:migrate => environment

wut :(