Скрипт Rails Ready не работает - PullRequest
       2

Скрипт Rails Ready не работает

0 голосов
/ 07 февраля 2011

Я только что установил Rails Ready скрипт из GitHub на моем Ubuntu Server 10.04. Установка прошла нормально:

Using aptitude for package installation
=> Updating system (this may take awhile)...
==> done...
=> Installing build tools...
==> done..
=> Installing libs needed for sqlite and mysql...
==> done...
=> Installing imagemagick (this may take awhile)...
==> done...
=> Installing git...
==> done...
==> done running ubuntu specific commands...
=> Installing RVM the Ruby enVironment Manager http://rvm.beginrescueend.com/rvm/install/ 
=> Setting up RVM to load with new shells...
==> done...
=> Loading RVM...
==> done...
=> Installing Ruby 1.9.2p136 (this will take awhile)...
=> More information about installing rubies can be found at http://rvm.beginrescueend.com/rubies/installing/ 
==> done...
=> Using 1.9.2 and setting it as default for new shells...
=> More information about Rubies can be found at http://rvm.beginrescueend.com/rubies/default/
==> done...
=> Reloading shell so ruby and rubygems are available...
==> done...
=> Installing Bundler, Passenger and Rails..
==> done...
#################################
### Installation is complete! ###
#################################
 !!! logout and back in to access Ruby or run source ~/.bashrc !!!
 Thanks!
-Josh

После установки я вышел из системы и вернулся в оболочку.

Тогда, однако, я не могу выполнить команду, связанную с Rails:

user@9001-3:~$ ruby
-bash: ruby: command not found
user@9001-3:~$ rails
-bash: rails: command not found
user@9001-3:~$ rvm
-bash: rvm: command not found
user@9001-3:~$ passenger-install-apache-module
-bash: passenger-install-apache-module: command not found

~ / .bashrc также не работает!

user@9001-3:~$ sudo bash ~/.bashrc
/home/user/.bashrc: line 6: return: can only `return' from a function or sourced script

$rvm_path (/usr/local/rvm) does not exist.
$rvm_path (/usr/local/rvm) does not exist.user@9001-3:~$ 

Bashrc можно прочитать здесь: http://pastebin.com/6K541E2V

Пожалуйста, вы можете мне помочь?

Ответы [ 3 ]

2 голосов
/ 07 февраля 2011

Это потому, что вам .bashrc не удалось загрузить полностью.

Скопируйте из него последнюю строку:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # Load RVM into a shell session *as a function*

Кому в первой строке от вас .bashrc. После того, как я предполагаю, что это работает.

Переустановите rvm:

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
1 голос
/ 07 февраля 2011

Вы правильно поняли: вы должны указать путь к среде Ruby to PATH.

Почему ~ / .bashrc не работает (с решением), описанным, например, здесь: http://forums.fedoraforum.org/showthread.php?t=215490

0 голосов
/ 24 февраля 2011

все, что мне нужно было сделать, это набрать

source ~/.bashrc
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...