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 trialKelvin Knighton
6,168 Pointsinstalling devise, in ruby on rails
I been looking all over the documentation, and looking at railscast to try to find the answer,but not getting any closer, when jason seifer: install devise, he gets this message some setup you must do manually if you haven't yet: about config.action_mailer and so on but when i do rails generate devise:install: i get ---> King-Georges-MacBook-Pro:youtheceo padawancoder$ rails generate devise:install
/Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in load': /Users/King-Gorge/youtheceo/config/routes.rb:5: syntax error, unexpected tLABEL (SyntaxError)
root-to: 'chatters#index'
^
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in
block in load'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in load_dependency'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in
load'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in block in load_paths'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in
each'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in load_paths'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:16:in
reload!'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:26:in block in updater'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in
call'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in execute'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:27:in
updater'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:6:in execute_if_updated'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application/finisher.rb:69:in
block in <module:Finisher>'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in instance_exec'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in
run'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in block in run_initializers'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in
block in tsort_each'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in block (2 levels) in each_strongly_connected_component'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in
each_strongly_connected_component_from'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in block in each_strongly_connected_component'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in
each'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in call'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in
each_strongly_connected_component'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in tsort_each'
from /Users/King-Gorge/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in
tsort_each'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in run_initializers'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in
initialize!'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in method_missing'
from /Users/King-Gorge/youtheceo/config/environment.rb:5:in
<top (required)>'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in require'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
block in require'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in load_dependency'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
require'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:189:in require_environment!'
from /Users/King-Gorge/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:44:in
<top (required)>'
from bin/rails:4:in require'
from bin/rails:4:in
<main>'
King-Georges-MacBook-Pro:youtheceo padawancoder$
can someone help me with this lol?
5 Answers
David Moore
13,916 PointsYou can do:
root to: 'chatters#index'
or
root 'chatters#index'
Both will work just fine and in the same way. If you are still getting the error, post your routes.rb file so we can take a look.
Chester Law
11,620 PointsIn your routes file, it should just be "root" instead of "root-to:". In general, Ruby doesn't use dashes much. So "root 'chatters#index'" is what you want for that line.
Kelvin Knighton
6,168 Pointsbut i didn't change it, i don't think so.. so i just changed it and saved it, and i exited the terminal went back into my app and tried it again, and try to install it again, but it's still a not working?? that's a bit weird.
Chester Law
11,620 PointsYes, those both seem fine, but he's doing "root-to" with a dash. And that's what's causing it to crash.
Kelvin Knighton
6,168 Pointsit worked guys! yeppe although i did type:$ bin/rails generate devise:install i start working on odot rails app, he uses bin alot so i thought i would give it a try.
thank you for your help guys