Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Ruby Rails环境完全支持路径、安装和brew_Ruby On Rails_Ruby_Environment - Fatal编程技术网

Ruby on rails Ruby Rails环境完全支持路径、安装和brew

Ruby on rails Ruby Rails环境完全支持路径、安装和brew,ruby-on-rails,ruby,environment,Ruby On Rails,Ruby,Environment,谢谢你帮助我 长话短说,我把这个放在了终点站 curl https://raw.github.com/gist/1688857/rbenv.sh | sh ; rbenv global 1.9.3-p327-perf 我最终在当前的ruby/rails上下载/安装了ruby。我及时制止了,但为时已晚。我的rails和ruby命令都不起作用 最初我安装railsinstaller是为了让rails/ruby启动并运行 我做了rvm内爆,删除了.bash_配置文件中的rvm路径, 还删除了/etc

谢谢你帮助我

长话短说,我把这个放在了终点站

curl https://raw.github.com/gist/1688857/rbenv.sh | sh ; rbenv global 1.9.3-p327-perf
我最终在当前的ruby/rails上下载/安装了ruby。我及时制止了,但为时已晚。我的rails和ruby命令都不起作用

最初我安装railsinstaller是为了让rails/ruby启动并运行

我做了rvm内爆,删除了.bash_配置文件中的rvm路径, 还删除了/etc/rvmrc文件。我认为rmv与我下载的新ruby冲突

最初,我使用railsinstaller启动并运行ruby/rails

然后我尝试安装railsinstaller,但没有成功!我后来卸载了railsinstaller,因为我想尝试brew

这是我的.bashrc配置文件

export PATH="/usr/bin:$PATH"
export PATH="/usr/local:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH=/usr/local/mysql/bin:$PATH
export PATH="/usr/local/opt/ruby/bin:$PATH"
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH

### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
这是我运行brew doctor时得到的结果

Warning: Setting DYLD_* vars can break dynamic linking.
    Set variables:
DYLD_LIBRARY_PATH

Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.

Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools for Xcode" package provided by Apple.

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

autoconf
libtool
(我尝试了上面的brew链接)

libtool也会发生同样的事情

Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path:
sudo xcode-select -switch /Applications/Xcode.app
当我运行brew安装ruby时

注意:默认情况下,gem安装的二进制文件将放入:
/usr/local/opt/ruby/bin
您可能希望将其添加到路径中。
警告:无法链接ruby。解除链接。。。
错误:“brew链接”步骤未成功完成
公式已生成,但未符号链接到/usr/local
您可以使用“brew链接ruby”重试
==>摘要

你有一些事情要做

首先,我没有使用railsinstaller,但它看起来是一个糟糕的交易。许多“一键式安装”应用程序最终会让您像这里一样陷入混乱。我建议您删除rails安装程序所做的一切,并遵循类似于本指南的内容来继续操作:。每个部分都是分开的

但是,如果你想尝试修复你得到的

首先,根据
brew-doctor
,您的自制软件似乎有一些问题。其中最大的一个是您需要安装Xcode命令行工具

这也应该注意autoconf和libtool警告

看起来您还需要更改/uar/local目录上的权限,因为homebrew将所有内容都放在该目录中


其次,通过brew安装Ruby是个坏主意。我建议使用rbenv或rvm。

Hi我更改了usr/local和已安装的xcode/命令行工具的权限,autoconf和libtool警告消失了。我卸载了railsinstaller。我也阅读了教程,但现在我发现了一些新的错误,我在上面粘贴了这些错误。谢谢,因为你的帮助,我走得很远!
Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path:
sudo xcode-select -switch /Applications/Xcode.app