开发者

Error installing AWS SDK for Ruby on Mac

I'm learning Ruby to access an AWS SDB created by my partner. When I installed the AWS SDK for Ruby on my Mac, I got the following message:

WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/royclymer/.gem/ruby/1.8开发者_JAVA百科/bin in your PATH, gem executables will not run.

I'm familiar with "PATH" from my PC days but have just started using Terminal on the Mac (to run Ruby) and can't find PATH command there. Maybe this isn't a problem, because it did say "six gems installed" but I also got several statements like "No definition for get_options."

Thanks.


It sounds like you are trying to install a gem into your system install ruby. You can likely resolve this issue by prefixing the gem install command with sudo.

sudo gem install aws-sdk

While this should work, its generally better to use a different solution that does not require installing gems as root (try googling rvm and rbenv).


PATH is not a command, it's an environment variable. To see the current content, do echo $PATH in your terminal. To temporarily change your PATH you can just re-export it like so:

export PATH=~/.gem:$PATH

For a permanent change you may want to read up on .bash_profile or .bashrc as well as /etc/paths and /etc/paths.d/.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜