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 trialDaniel Oropeza
4,432 PointsRuby won't compile on the cmd line?
I have downloaded Ruby, have the mySQL, Apache servers turned on. Whenever I try to run a ruby program on my command prompt, it won't compile. Instead, it opens it up the text editor after I press enter. Anyone have any advice? I know these are the worst type of questions, but I'm getting tired of messing with it
3 Answers
Tim Knight
28,888 PointsDaniel,
What are you typing at the command prompt to try to run your script? Remember that Ruby isn't a compiled language so you'd run a Ruby script by typing in ruby ./script.rb
at the command prompt to run your script through the Ruby interpreter.
jason chan
31,009 PointsTry this
https://bitnami.com/stack/ruby
It's usually better to install ruby on rails stacks on linux or mac.
Daniel Oropeza
4,432 PointsThat's it! I needed to type "ruby ./" prior to the file name. Thank you Tim.
Only thing was that I had to place the file directly under the C:/users/Daniel> folder on my PC for it to work. I suppose I need practice with the cmd line.
And yes Jason, that's the version I have downloaded. Downloaded that one after some trouble with another download.