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 Foundations Objects, Classes, and Variables Reserved Words

Keith Kasputis
Keith Kasputis
11,365 Points

localhost:3000 and Textmate from the terminal.

Hi, I was able to install and use server but after closing down the terminal, I can not figure out how start up the server again. Can someone please point me to some instructions on how restart the server after the original install?

Second question, I see Jason run the Mate command in the terminal to run the Texmate text editor. When I run the same command, the error message is command not found. I have Textmate on my Mac but typically launch it from the apps folder. How is he running the text editors from the terminal?

3 Answers

John Steer-Fowler
PLUS
John Steer-Fowler
Courses Plus Student 11,734 Points

Hi Keith,

With regards to Textmate, running mate [file] in the directory you are running your source files should open that file. To open the whole folder, run mate . (note the ".")

If this still does not work, then consult the Textmate documentation. You might need to set this feature up. I personally use Sublime Text 2 as I find it more efficient.

With regards to the 'server', are you referring to a Ruby on Rails server? If so, then the command to run the server is simple. Open the terminal and type rails s or rails server

Hope this helps

Keith Kasputis
Keith Kasputis
11,365 Points

Hi John, Thanks for the answers. Both seem to be good answers but neither are working. I will have to consult the documentation for the Textmate. I will have to find out how to make the terminal app point to Mate. I am considering switching to Sublime Text 2 seems to be the editor of choice for the pros.

The rails s and rails server commands return a bunch of options and it appears it is looking for a file name as well but it does not start the server on port 3000. For now the lessons do not require the server so I will continue to look for the answer.

John Steer-Fowler
John Steer-Fowler
Courses Plus Student 11,734 Points

Hi again Keith,

Sublime Text 2 is excellent, I thoroughly recommend it.

With regards to the rails s it seems as though you are not in your directory for your rails app. Move to the directory for your app and then run these commands again.

James Barnett
James Barnett
39,199 Points

I am considering switching to Sublime Text 2 seems to be the editor of choice for the pros

Sublime Text is trendy, but no means a standard. It's worth noting that Sublime Text is made by one person, if they get tired of it, that will be the end of bug fixes for that product. If you are looking for a text editor made by more than just one person and also free I'd suggest you check out http://brackets.io

John Steer-Fowler
John Steer-Fowler
Courses Plus Student 11,734 Points

I use brackets for creating html sites because of the live functionality which is brilliant, but I thought it didn't support ruby or php development?

James Barnett
James Barnett
39,199 Points

John Steer-Fowler -

You make a good point. I'm not sure about the difference in support between with Sublime Text gives you and what brackets gives you.

https://groups.google.com/forum/#!msg/brackets-dev/wOIEOhVG6NQ/aYXxuwhfHkAJ