2016-04-01 30 views
1

私は本当に助けが必要です。私はRubyの専門家ではなく、私のUbuntuサーバー上で実行する既存のRubyアプリケーションを取得しようとしています。Ruby on Railsエラー

私は私がすべてを正しく行っていると思いますが、私は、次のエラーを取得し続ける:ここ

Warning! PATH is not properly set up, $GEM_HOME is not set, 
     usually this is caused by shell initialization files - check   
them for 'PATH=...' entries, 

と同様に

You are using '.rvmrc', it requires trusting, it is slower and it is  
not compatible with other ruby managers, 
you can switch to '.ruby-version' using 'rvm rvmrc to ruby-version' 

はRVM先から出力された:

rvm info 
Warning! PATH is not properly set up, $GEM_HOME is not set, 
usually this is caused by shell initialization files - check  
them for 'PATH=...' entries, it might also help to re-add RVM 
to your dotfiles: 'rvm get stable --auto-dotfiles',to fix 
temporarily in this shell session run: 'rvm use ruby-2.2.1'. 

system: 

system: 
uname:  "Linux ip-172-31-22-20 3.13.0-83-generiC#127-Ubuntu 
SMP Fri Mar 11 00:25:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux" 
system:  "ubuntu/14.04/x86_64" 
bash:  "/bin/bash => GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)" 
zsh:   " => not installed" 

    rvm: 
version:  "rvm 1.27.0 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]" 
updated:  "1 hour 16 minutes 14 seconds ago" 
path:   "/usr/local/rvm" 

    homes: 
gem:   "not set" 
ruby:   "/usr/local/rvm/rubies/ruby-2.2.1" 

    binaries: 
ruby:   "/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby" 
irb:   "/usr/local/rvm/rubies/ruby-2.2.1/bin/irb" 
gem:   "/usr/local/rvm/rubies/ruby-2.2.1/bin/gem" 
rake:   "/usr/local/rvm/rubies/ruby-2.2.1/bin/rake" 

    environment: 
PATH:   "/usr/local/rvm/gems/ruby-2.2.1/bin:/usr/local/rvm/gems/[email protected]/bin:/usr/local/rvm/rubies/ruby-2.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/rvm/bin" 
GEM_HOME:  "" 
GEM_PATH:  "" 
MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-2.2.1" 
IRBRC:  "/usr/local/rvm/rubies/ruby-2.2.1/.irbrc" 
RUBYOPT:  "" 
gemset:  "" 

感謝!!!!

UPDATE

おかげで、私が使用してGEM_HOMEとGEM_PATH値を設定することができた。しかし、私は、フォルダを変更し、戻ったときに、私はエラーを取得します(下記参照)

export GEM_HOME=/usr/local/rvm/gems/ruby-2.2.1 
export GEM_PATH=/usr/local/rvm/gems/ruby-2.2.1:/usr/local/rvm/gems/[email protected] 
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile 

をし、変数はもはや設定されません。

You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers, 
you can switch to '.ruby-version' using 'rvm rvmrc to ruby-version' 
or ignore this warning with 'rvm rvmrc warning ignore /var/www/XXXXX/MicoBackup/.rvmrc', 
'.rvmrc' will continue to be the default project file in RVM 1 and RVM 2, 
to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'. 

Gemset 'XXXXXX' does not exist, 'rvm ree-1.8.7-2012.02 do rvm gemset create XXXXXX' first, or append '--create'. 

答えて

1

の重複のように見える:エラーメッセージは、あなたのPATHにGEM_HOMEを逃している、示したようhttps://unix.stackexchange.com/questions/203376/how-to-set-ruby-gem-home-and-gem-path

。確かRVMを行うことにより

スタートが正しく.bash_profileに供給される。

echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile 

問題が解決しない場合は、手動GEM_HOMEを設定してみてくださいすることができます。上記の提供されたリンクを参照してください。

+0

ありがとう、ちょっと助けてくれました。上記の私の更新をご覧ください。 – user3255066