0

谢谢你帮助我!

长话短说,我把它放在终端里

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 implode,删除了 .bash_profile 中的 rvm 路径,也删除了 /etc/rvmrc 文件。我认为 rmv 与我下载的新红宝石发生冲突。

最初我使用 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 链接)

Error: Could not symlink file: /usr/local/Cellar/autoconf/2.69/bin/ifnames
/usr/local/bin/ifnames may already exist.
/usr/local/bin may not be writable.

同样的事情发生在 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 install ruby​​ .......

NOTE: By default, gem installed binaries will be placed into:
   /usr/local/opt/ruby/bin

 You may want to add this to your PATH.
 Warning: Could not link ruby. Unlinking...
 Error: The `brew link` step did not complete successfully
 The formula built, but is not symlinked into /usr/local
 You can try again using `brew link ruby'
     ==> Summary
  /usr/local/Cellar/ruby/2.0.0-p0: 877 files, 18M, built in 2.7 minutes

有一些我无法访问的 bash 命令。我每次都必须获取我的 bashprofile 才能让一些 bash 命令正常工作.....


我是 Rails 新手,我正在开发一个 Rails 应用程序。rails mvc 的概念很容易掌握,但是我没太注意。-paths -environments -rbenv -rvm -brew -bash 命令

ETC

这是您在安装完所有内容后开始制作应用程序并且不太了解 ruby​​/rails 在出现问题时如何在引擎盖下工作的类型。

如果有人能指出我正确的方向。我会喜欢你的帮助。我将尝试自己进一步研究。

谢谢!如果您需要更多信息,请告诉我,谢谢!


嗨,这是我的更新

谢谢!所以我安装了 xcode,我浏览了本教程 https://coderwall.com/p/auvm9g 并成功安装了所有东西,但我的电脑找不到我安装的 ruby​​/rails。它在安装完成时出现,但在我退出终端后我丢失了它。


我做了酿造医生

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

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config

Here is my .bashrc

PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin


export PATH="/usr/local:$PATH"ls
export PATH=/usr/local/mysql/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"

这是我的 .bash_profile

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into    shell session *as a function*
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

PATH="/usr/local/bin:/usr/local/heroku/bin:/usr/local/mysql/bin:/usr/local/bin:$PATH"

红宝石-v

rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  1.9.3-p286

导轨-v

rbenv: rails: command not found

The `rails' command exists in these Ruby versions:
  1.9.3-p286

\curl -L https://get.rvm.io | bash -s 稳定 --ruby

Upgrading the RVM installation in /Users/judyngai/.rvm/
RVM PATH line found in /Users/judyngai/.zshrc.
RVM sourcing line found in /Users/judyngai/.bash_profile /Users/judyngai/.zlogin.
Installing rvm gem in 1 gemsets ERROR:  Loading command: install (LoadError)
cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass


Upgrade Notes:



 * WARNING: Above files contains `PATH=` with no `$PATH` inside, this can break RVM,
 for details check https://github.com/wayneeseguin/rvm/issues/1351#issuecomment-10939525
 to avoid this warning append #PATH.

 * No new notes to display.

我的 .rvm 和 .benv 在我的 Users/judyngai/.rvm

我很确定我有路径问题,如果有人能启发我,我会非常高兴和感激!

4

1 回答 1

0

你有一些事情正在发生。

首先,我没有使用 railsinstaller,但它看起来很糟糕。许多这些“一键式安装”应用程序最终会让您像这里一样一团糟。我建议删除 Rails 安装程序所做的所有事情,并按照本指南之类的内容进行操作:https ://coderwall.com/p/auvm9g 。这将分别执行每个部分。

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

首先,根据brew doctor. 其中最大的是您需要安装 Xcode 命令行工具。

这也应该注意 autoconf 和 libtool 警告。

看起来您还需要更改 /uar/local 目录的权限,因为这是自制软件放置所有内容的地方。

其次,通过 brew 安装 Ruby 是个坏主意。我推荐 rbenv 或 rvm。

于 2013-04-11T02:25:22.483 回答