[英]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. 我正在学习使用Bootstrap,并在最后几个小时内与Terminal进行了角力,因为我试图安装它随附的软件-Ruby,Rails,SASS和另外两个或三个。 It was a failure, though I did get most of the programs installed.
尽管我确实安装了大多数程序,但还是失败了。
Now it appears that Rails has hijacked my Terminal. 现在看来,Rails劫持了我的终端机。 I tried installing another toy I wanted to try out, Symfony.
我尝试安装另一个我想尝试的玩具,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 如果我输入$ php --version我会收到相同的消息
Anyway, the word "Rail" leads me to suspect that Terminal is in Rails mode. 无论如何,“ Rail”一词使我怀疑Terminal处于Rails模式。 Can anyone tell me how to turn it off?
谁能告诉我如何将其关闭? I wasn't allowed to ask about it on the Apple forum;
我不允许在Apple论坛上询问此事; they seem to have a problem with questions related to this topic.
他们似乎对与此主题相关的问题有疑问。 ;)
;)
Thanks. 谢谢。
PS I'm using OSX Yosemite. PS我正在使用OSX Yosemite。
The :Rail
in Davids-MacBook-Pro:Rail myname$
indicates that you're currently in a folder named Rail
. 的
:Rail
在Davids-MacBook-Pro:Rail myname$
表明您命名的文件夹中当前所在Rail
。 There is no "Rails mode," and Rails will not "hijack" your terminal. 没有“ Rails模式”,Rails不会“劫持”您的终端。
Type the pwd
command to reveal which folder you're in (which I'm guessing is a folder named Rail
). 键入
pwd
命令以显示您所在的文件夹(我猜这是一个名为Rail
的文件夹)。
If you cd
into another folder, your command prompt will update to reflect that: 如果你
cd
到另一个文件夹,您的命令提示符下将更新,以反映:
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. 用于安装symfony的命令,请确保一次输入一个,并且不包含引起错误的
$
。
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
通过输入
cd
进入主目录,然后输入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. 顺便说一下,Bootstrap只是一个CSS,HTML和一些可以与多种语言一起使用的javascript框架/库,而不必是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).
默认情况下,优胜美地也安装了ruby,但是您可能需要对其进行更新,并且Rails会自动包含SASS(Rails和SASS都是宝石)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.