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 Ruby on Rails 5 Basics Creating an App Creating a Rails App

Brendan Whiting
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 Points

Can't run server rails in Treehouse workspace

I had some issues getting rails up and running on my own environment, so I thought I would try doing the course in a Treehouse workspace with the Ruby environment for now. I'm running into an issue where it gets stuck on this 'nokigiri' gem and then eventually times out. I've tried a few times. From my command line:

treehouse:~/workspace$ ls                                                                                                      
blog                                                                                                                           
treehouse:~/workspace$ cd blog                                                                                                 
treehouse:~/workspace/blog$ ls                                                                                                 
app  bin  config  config.ru  db  Gemfile  Gemfile.lock  lib  log  public  Rakefile  README.md  test  tmp  vendor               
treehouse:~/workspace/blog$ bin/rails server                                                                                   
Could not find nokogiri-1.8.1 in any of the sources                                                                            
Run `bundle install` to install missing gems.                                                                                  
treehouse:~/workspace/blog$ bundle install                                                                                     
^[cFetching gem metadata from https://rubygems.org/.........                                                                   
Using rake 12.3.0                                                                                                              
Using concurrent-ruby 1.0.5                                                                                                    
Using i18n 0.9.1                                                                                                               
Using minitest 5.10.3                                                                                                          
Using thread_safe 0.3.6                                                                                                        
Using tzinfo 1.2.4                                                                                                             
Using activesupport 5.0.6                                                                                                      
Using builder 3.2.3                                                                                                            
Using erubis 2.7.0                                                                                                             
Using mini_portile2 2.3.0                                                                                                      
Fetching nokogiri 1.8.1                                                                                                        
Installing nokogiri 1.8.1 with native extensions                                                                               

1 Answer

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

I'm afraid Rails just doesn't work in Workspaces. We attempted to create a setup where Rails was pre-installed for students (Nokogiri and all), but it turns out that Workspaces filesystem access is too slow to run an app reliably (if at all).

You might have better luck installing Linux on VirtualBox and then installing Rails within Linux.