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 trialChris Ward
12,129 PointsRails: Lengthy error message on server launch
Ok, so I followed the lengthy install instructions and uncovered some unpleasant surprises along the way, but after some adjustments it seems that the installation of Ruby and Rails and everything associated with it finally worked out fine. I also have no issue generating an application with Rails. However, I am hitting a dead-end when I type bundle exec rails server
.
Here is the lengthy error message I am getting:
C:\Dev\Ruby223\Proj\Test>bundle exec rails server
C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:29:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:29:in `rescue in <top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:25:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/sanitize_helper.rb:3:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/sanitize_helper.rb:3:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_helper.rb:4:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:50:in `<module:Helpers>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:3:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:45:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:45:in `<module:Helper>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:7:in `<module:Rails>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:6:in `<module:Sprockets>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/helper.rb:5:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/railtie.rb:6:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/railtie.rb:6:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:3:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:3:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.rb:11:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.rb:11:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.rb:1:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.rb:1:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
from C:/Dev/Ruby223/Proj/Test/config/application.rb:7:in `<top (required)>'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Dev/Ruby223/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
11 Answers
Jamie Perlmutter
10,955 PointsOk so I got rails working on my computer and I'm not going to lie it's hard. What have you already done? Are you just starting out? Because it's gonna be difficult to get it working but it's totally possible. So hang in there, I'll need to know if you have ever ran ruby rails on your computer, and if you're planing on running it on your computer or through treehouse(assuming you're starting out)?
Chris Ward
12,129 PointsNo, I don't plan to use the VM. I need this to work in real life.
Jamie Perlmutter
10,955 PointsAlso as an added note, Ruby on Rails course can be a little frustrating, I finished it, it took awhile but I got through it. I am by no means trying to say not to do it, I'm glad I did, it's just going to be hard to follow sometimes.
Chris Ward
12,129 PointsJason doesn't mention that we can't have white space in the Ruby directory path. It took me some time to figure that out. You're also supposed to modify the config.yml file to include your Ruby directory as it would be written in YAML, also something Jason doesn't do in his video.
So, where am I at...I've got all the way to the end of the video where you type the command to get testapp running on rails. It seems we are running through some section of code inspecting the gems. And nokogiri encounters some type of error which it then tries to load the non-existent file nokogiri/nokogiri.rb. It isn't clear whether or not this is intentional. With such a long error message, it could take quite some time to figure it out.
Jamie Perlmutter
10,955 PointsSo two main problems I had was the PATH and then going to the ruby rails files and changing their security settings so all users could use them, so right clicking on them and making sure at the bottom they are allowed to be used(sometimes it'll say it was downloaded from another computer and won't allow access) and then going to the security tab at the top and making sure that the users can use the file. It's annoying and takes some time but after that I didn't have any issues really. I am more than happy to help if that doesn't work. Just let me know
Chris Ward
12,129 PointsOK, so which files do I need to check?
Jamie Perlmutter
10,955 PointsHonestly I did mostly all of them, I'm not sure that's the issue though, because it if you downloaded the latest version of ruby it won't work with Windows, and it looks like you might have. Try going using version 2.0
Jamie Perlmutter
10,955 PointsThe other problem was I had to actually go down a version of rails because the news version wouldn't work, it's a known issue but they haven't fixed it. So I went with ruby 2.0. Which is annoying however it is what it is. Did you do a higher ruby version?
Chris Ward
12,129 PointsThere are three stable releases mentioned... 2.2.3, 2.1.7 and 2.0. I downloaded the latest. To go back to 2.0 is pretty far back. I don't understand why they would post a release that does not work. Can you show me some documentation of this issue? Any URL you can point me to?
Jamie Perlmutter
10,955 PointsHonestly I can try to find it again, Google Windows 8 and ruby version and it should probably come up. I just know it wasn't working when I tried and from what I found it wasn't working for others either.
Jamie Perlmutter
10,955 PointsBecause there is so few people that run it on Windows it's hard to find good advice, I had to look through a lot of posts here and make somethings up as I went. Windows and Ruby Rails are not friends, good news is I got it to work so I am more than happy to help.
Chris Ward
12,129 PointsI'm only running it on Windows because I am having issues with my Mac. If it's this difficult to set up on a Mac as well, it might not be worth the effort.
Jamie Perlmutter
10,955 PointsIt is easier on a Mac, Windows is just a pain to get it to work honestly. Mostly everyone uses a Mac for ruby from what I seem to have found
Chris Ward
12,129 PointsI would really like to hear Jason's response to this thread so I can decide whether or not to expend further effort on this. I don't mind your input, too. The problem is Apple's simple solution is to force you to upgrade everything. And that may not work in my case because of hardware issues. I would rather wait to upgrade. To upgrade to one of the newer OSes, I would probably have to swap out the solid state disk and also repair the fan which is not coming on. I am actively monitoring the temperature on that computer and think that an upgrade will spike it to T-JUNCTURE of 105 C. So, even if it might work with another effort, I just really don't feel like going to those lengths when there should be a simpler solution. Why is rbenv complaining about the version of clang? They must be taking advantage of some newer features.
Chris Ward
12,129 PointsChris Ward
12,129 PointsOK...perhaps I misinterpreted this error. It is saying it is in a block in server.