It's assumed you use RVM with Ruby 1.9.2
luan@luan-Latitude-D430:~$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
luan@luan-Latitude-D430:~$ rvm 1.9.2 --passenger
NOTE: If you are using Passenger 3 you no longer need the passenger_ruby,
use the wrapper script for your ruby instead (see 'rvm wrapper')
luan@luan-Latitude-D430:~$ rvm 1.9.2
luan@luan-Latitude-D430:~$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
luan@luan-Latitude-D430:~$ gem install passenger
Fetching: fastthread-1.0.7.gem (100%)
Building native extensions. This could take a while...
Fetching: daemon_controller-0.2.6.gem (100%)
Fetching: spruz-0.2.5.gem (100%)
Fetching: file-tail-1.0.5.gem (100%)
Fetching: passenger-3.0.5.gem (100%)
Successfully installed fastthread-1.0.7
Successfully installed daemon_controller-0.2.6
Successfully installed spruz-0.2.5
Successfully installed file-tail-1.0.5
Successfully installed passenger-3.0.5
5 gems installed
Installing ri documentation for fastthread-1.0.7...
Installing ri documentation for daemon_controller-0.2.6...
Installing ri documentation for spruz-0.2.5...
Installing ri documentation for file-tail-1.0.5...
Installing ri documentation for passenger-3.0.5...
Installing RDoc documentation for fastthread-1.0.7...
Installing RDoc documentation for daemon_controller-0.2.6...
Installing RDoc documentation for spruz-0.2.5...
Installing RDoc documentation for file-tail-1.0.5...
Installing RDoc documentation for passenger-3.0.5...
luan@luan-Latitude-D430:~$
luan@luan-Latitude-D430:~$rvmsudo passenger-install-nginx-module
http://github.com/jnstq/rails-nginx-passenger-ubuntu
luan@luan-Latitude-D430:~$cd
luan@luan-Latitude-D430:~$git clone git://github.com/jnstq/rails-nginx-passenger-ubuntu.git
luan@luan-Latitude-D430:~$sudo mv rails-nginx-passenger-ubuntu/nginx/nginx /etc/init.d/nginx
luan@luan-Latitude-D430:~$sudo chown root:root /etc/init.d/nginx
To do next:
luan@luan-Latitude-D430:~$ cd to-your-rails-app-folder
luan@luan-Latitude-D430:~$bundle install
luan@luan-Latitude-D430:~$rake db:setup RAILS_ENV=production
luan@luan-Latitude-D430:~$sudo /etc/init.d/nginx restart
Showing posts with label RVM. Show all posts
Showing posts with label RVM. Show all posts
Tuesday, March 22, 2011
Sunday, February 6, 2011
crontab doesn't work with ruby rvm
I am using RVM ruby, and crontab doesn't work properly.
crontab doesn't look at .bashrc or .bash_profile. Therefore, we have to add this into
sudo vi /etc/profile. Just source whatever in profile.
luan@luan-laptop:/etc$ head profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
# luan added here
source /home/luan/.bash_profile
# end luan added
if [ -d /etc/profile.d ]; then
crontab doesn't look at .bashrc or .bash_profile. Therefore, we have to add this into
sudo vi /etc/profile. Just source whatever in profile.
luan@luan-laptop:/etc$ head profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
# luan added here
source /home/luan/.bash_profile
# end luan added
if [ -d /etc/profile.d ]; then
Saturday, July 31, 2010
Install RVM system wide on Ubuntu Server
1: Install git if you don't already have it
$ sudo apt-get install git-core
2: Download RVM
$ sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )
This creates /usr/local/rvm and the group 'rvm'
3: Add each user to group rvm
$ sudo usermod -aG rvm ubuntu
4: Add startup lines to each user's .profile
[[ -s '/usr/local/lib/rvm' ]] && source '/usr/local/lib/rvm'
5: Add this line to /etc/rvmrc (may not be necessary)
$ echo "export rvm_path=/usr/local/rvm" > /etc/rvmrc
6: Use rvm as a user - best to logout/login first to make sure you get all the paths etc setup
$ rvm list
$ rvm package install zlib ( I needed this to get install to work )
$ rvm install 1.9.2 --with-zlib-dir=/usr/local/rvm/usr
To set default ruby version
$rvm --default use 1.9.2
$ sudo apt-get install git-core
2: Download RVM
$ sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )
This creates /usr/local/rvm and the group 'rvm'
3: Add each user to group rvm
$ sudo usermod -aG rvm ubuntu
4: Add startup lines to each user's .profile
[[ -s '/usr/local/lib/rvm' ]] && source '/usr/local/lib/rvm'
5: Add this line to /etc/rvmrc (may not be necessary)
$ echo "export rvm_path=/usr/local/rvm" > /etc/rvmrc
6: Use rvm as a user - best to logout/login first to make sure you get all the paths etc setup
$ rvm list
$ rvm package install zlib ( I needed this to get install to work )
$ rvm install 1.9.2 --with-zlib-dir=/usr/local/rvm/usr
To set default ruby version
$rvm --default use 1.9.2
Thursday, July 22, 2010
RVM with Ubuntu 10.4
1. install ruby lib:
sudo apt-get install curl git-core bison build-essential zlib1g-dev libssl-dev libreadline6-dev libxml2-dev autoconf libxslt1-dev libpq-dev postgresql
2. install rvm
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
3. extra check
mkdir -p ~/.rvm/src/ && cdm ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install
4. add this line very end of your profile(.bash_profile)
# this is for rvm
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
5. to install ruby 1.9.1
rvm install 1.9.1 ; rvm 1.9.1
sudo apt-get install curl git-core bison build-essential zlib1g-dev libssl-dev libreadline6-dev libxml2-dev autoconf libxslt1-dev libpq-dev postgresql
2. install rvm
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
3. extra check
mkdir -p ~/.rvm/src/ && cdm ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install
4. add this line very end of your profile(.bash_profile)
# this is for rvm
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
5. to install ruby 1.9.1
rvm install 1.9.1 ; rvm 1.9.1
Subscribe to:
Posts (Atom)