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 trialKevin Schaffter
927 PointsPreview Function not working
I can't use the "preview" function to see my sinatra app... it just says it is not active even though I've made sure the workspace is up to date.
Any ideas?
1 Answer
Jay McGavren
Treehouse TeacherI'm able to get a preview going by following these steps:
- Visit https://teamtreehouse.com/library/getting-html-from-a-template. (These general steps should work anywhere in the course, but that's the video linked from this Community post.)
- Click "Launch Workspace".
- From the console, run
ruby wiki.rb
, and leave it running. - Click the "preview" icon, and choose port 4567. (This is important, because that's the port Sinatra listens on by default. It won't connect if you choose a different port.)
If you do that, a window should pop up showing "Welcome to our Wiki!".
If you're trying to run an app you've created yourself, make sure you've included set :bind, "0.0.0.0"
in the source. It would help us diagnose the problem if you could post your full source code here.
If you're still having trouble, please let us know!
Kyle Shamblin
9,945 PointsKyle Shamblin
9,945 PointsI'm also having this issue.