简体   繁体   中英

Turning off Rails in Mac Terminal

I'm learning to use Bootstrap and spent the last few hours wrestling with Terminal as I tried to install the software that accompanies it - Ruby, Rails, SASS and two or three more. It was a failure, though I did get most of the programs installed.

Now it appears that Rails has hijacked my Terminal. I tried installing another toy I wanted to try out, Symfony. When I type in the install command

$ curl -LsS http://symfony.com/installer > symfony.phar
$ sudo mv symfony.phar /usr/local/bin/symfony
$ chmod a+x /usr/local/bin/symfony

I get this message:

-bash: $: command not found
Davids-MacBook-Pro:Rail myname$

I get the same message if I type in $ php --version

Anyway, the word "Rail" leads me to suspect that Terminal is in Rails mode. Can anyone tell me how to turn it off? I wasn't allowed to ask about it on the Apple forum; they seem to have a problem with questions related to this topic. ;)

Thanks.

PS I'm using OSX Yosemite.

The :Rail in Davids-MacBook-Pro:Rail myname$ indicates that you're currently in a folder named Rail . There is no "Rails mode," and Rails will not "hijack" your terminal.

Type the pwd command to reveal which folder you're in (which I'm guessing is a folder named Rail ).

If you cd into another folder, your command prompt will update to reflect that:

Davids-MacBook-Pro:Rail myname$ cd ~/Desktop
Davids-MacBook-Pro:Desktop myname$

The commands to install symfony, make sure you enter them one at a time and don't include the $ which is causing the error.

You can configure what appears currently as

Davids-MacBook-Pro:Rail myname$

by going typing cd to go to your home directory and than nano .bash_profile

By the way Bootstrap is just a css, html, and a bit of javascript framework/library that you can use with a bunch of different languages doesn't have to be Ruby on Rails. Also ruby is installed on yosemite by default but you might need to update it and Rails automatically includes SASS (Both Rails and SASS are gems).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM