# Ruby and Terminal - why didn't anyone explain this?

**URL:** <https://www.ruby-forum.com/t/ruby-and-terminal-why-didnt-anyone-explain-this/166043>\
**Category:** Rails\
**Created:** [April 21, 2009, 9:10am UTC](https://www.ruby-forum.com/t/ruby-and-terminal-why-didnt-anyone-explain-this/166043 "2009-04-21T09:10:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 21, 2009, 9:10am UTC](https://www.ruby-forum.com/t/ruby-and-terminal-why-didnt-anyone-explain-this/166043/1 "2009-04-21T09:10:59Z")

</div>

I’m learning RoR. I’ve been using PHP for 6 years now. I bought the  
new Agile Web Dev With Rails book and it took me about 9 hours to get  
the first project going. No where did it, or anywhere else explain  
the whole terminal inputs. It just said to open your “shell”… What is  
the deal with those, why do I have to use them, and why can’t it be  
just simple text files like PHP?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 21, 2009, 9:45am UTC](https://www.ruby-forum.com/t/ruby-and-terminal-why-didnt-anyone-explain-this/166043/2 "2009-04-21T09:45:34Z")

</div>

On 21 Apr., 00:42, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m learning RoR. I’ve been using PHP for 6 years now. I bought the  
> new Agile Web Dev With Rails book and it took me about 9 hours to get  
> the first project going. No where did it, or anywhere else explain  
> the whole terminal inputs. It just said to open your “shell”… What is  
> the deal with those, why do I have to use them, and why can’t it be  
> just simple text files like PHP?

Well, you do use “simple text files”, just like in PHP. The difference  
between PHP and Rails, though, is that the only thing you need to do  
in PHP is to download a package like xampp (e.g.) and just put your  
files in the right directory. In Rails, there is a predefined  
directory structure, so you’ll need to generate Rails projects _in the  
shell_. And you have to actively start the server _in the shell_ to  
view your application in the browser. Also when you generate models  
and controllers you go to _the shell_ and type the respective  
commands.

As you can see, Rails uses the shell to stop you from repeating  
yourself and thereby it speeds up your development process. The reason  
why no one has explained this to you, could be because most Rails  
developers works in operating systems like Ubuntu (Linux) or Mac OS  
where the shell/terminal/command line is a completely natural place to  
be, in contrast to on Windows systems where most things are done via  
graphical interfaces.

I hope you understand, and I also hope you’ll come to appreciate the  
power of the shell.

–  
Best regards,  
David K.  
[http://twitter.com/perplect](http://twitter.com/perplect)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 22, 2009, 3:28am UTC](https://www.ruby-forum.com/t/ruby-and-terminal-why-didnt-anyone-explain-this/166043/3 "2009-04-22T03:28:31Z")

</div>

On Apr 21, 10:04 am, Marnen Laibow-Koser \<rails-mailing-l…@andreas-  
[s.net](http://s.net)\> wrote:

> removed\_email\_address@domain.invalid wrote:
> 
> > I’m learning RoR. I’ve been using PHP for 6 years now.  
> > […]  
> > It just said to open your “shell”… What is  
> > the deal with those,
> 
> Are you trying to say that in 6 years of PHP development, you haven’t  
> touched a command line, and don’t even really know what one is?

Wait till he finds out about source control…

–Matt J.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 21, 2009, 4:04pm UTC](https://www.ruby-forum.com/t/ruby-and-terminal-why-didnt-anyone-explain-this/166043/4 "2009-04-21T16:04:11Z")

</div>

removed\_email\_address@domain.invalid wrote:

> I’m learning RoR. I’ve been using PHP for 6 years now.  
> […]  
> It just said to open your “shell”… What is  
> the deal with those,

Are you trying to say that in 6 years of PHP development, you haven’t  
touched a command line, and don’t even really know what one is? How do  
you install modules, then?

> why do I have to use them,

You don’t. Rails just provides a bunch of shell commands to make your  
life easier. You could ignore them all if you really wanted to,  
although your productivity would suffer.

> and why can’t it be  
> just simple text files like PHP?

It is just simple text files. Whatever made you think otherwise?

Note that some PHP frameworks (such as Symfony) take a similar approach  
to use of the command line.

Does this help, or is there an issue here I’m not getting?

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 22, 2009, 12:01pm UTC](https://www.ruby-forum.com/t/ruby-and-terminal-why-didnt-anyone-explain-this/166043/5 "2009-04-22T12:01:00Z")

</div>

Hmm… I just typed in, “script/server RAILS\_ENG=development” and it  
fixed my problems. Why would that be?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 22, 2009, 11:50am UTC](https://www.ruby-forum.com/t/ruby-and-terminal-why-didnt-anyone-explain-this/166043/6 "2009-04-22T11:50:27Z")

</div>

Thanks a lot guys!.. I’m SLOWLY getting familiar with the shell.

Maybe I should start another topic for this… but:  
My ruby isn’t working anymore!  
In the last few hours I deleted some random ruby files on my main user  
folder (mac OSX) because I think I accidentally installed a rails app  
there and wanted to get rid of the files. I also installed and  
reinstalled mysql.

Since then, ruby is not working. No controllers are working at all,  
even old ones I had looked at before. On the homepage (localhost:3000)  
I get this message when I click the about link: “We’re sorry, but  
something went wrong.”  
Also when I visit my controller url I get this: “We’re sorry, but  
something went wrong.”

Thanks for all the help!
