Hi Vell
Doing a reinstall might well save you a lot of hassle. In my last
install I used sudo all the way through (the server is a test server for
an eventual production server) and no RVM since I was only going to use
Ruby 1.9.2 (like you). I wrote down all the steps during the install and
this “recipe” works well enough for me. Note that all apt-get installs
use sudo, no doubt there are some places where that was unnecessary -
but I couldn’t be bothered to find out. The server also has Asterisk
installed, you probably don’t need that so I’ve commented out those
lines that are Asterisk specific (with ##) but left them in the recipe
anyway:
During install, Ubuntu 11.10, following packages selected:
OpenSSH server
LAMP server
$sudo visudo
##added last line:
ALL=(ALL) NOPASSWD: ALL
$sudo apt-get update
$sudo apt-get upgrade
##$sudo apt-get install asterisk sox asterisk-mysql asterisk-mp3
$sudo apt-get install build-essential openssl libreadline6
libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev
libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf
libc6-dev ncurses-dev automake libtool bison subversion
$sudo apt-get install ruby1.9.2
$ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
$gem -v
1.3.7
$sudo gem update
$sudo env REALLY_GEM_UPDATE_SYSTEM=1 gem update --system
$gem -v
1.8.12
$sudo apt-get install ruby1.9.1-dev
##see:
http://rbjl.net/20-rubybuntu-2-troubleshooting-common-ruby-ubuntu-problems
$sudo gem install rails -v=3.1.0
$rails -v
Rails 3.1.0
$rake --version
rake, version 0.9.2
$sudo gem install passenger
$sudo passenger-install-apache2-module
$sudo apt-get install libcurl4-openssl-dev
$sudo apt-get install apache2-prefork-dev
$sudo apt-get install libapr1-dev
$sudo passenger-install-apache2-module
$sudo vim /etc/apache2/apache2.conf
##Added these lines at bottom of file:
LoadModule passenger_module
/usr/lib/ruby/gems/1.9.1/gems/passenger3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.11
PassengerRuby /usr/bin/ruby1.9.1
$sudo service apache2 restart
##$sudo gem install adhearsion
##$ahn -v
>Adhearsion v1.2.3
$sudo apt-get install phpmyadmin
##Install java runtime:
$sudo apt-get install python-software-properties
$sudo add-apt-repository ppa:chris-lea/node.js
$sudo apt-get update
$sudo apt-get install nodejs
END install - and everything works fine
-----Oprindelig meddelelse-----
Fra: [email protected]
[mailto:[email protected]] P vegne af Vell
Sendt: 15. december 2011 06:06
Til: Ruby on Rails: Talk
Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely
together
Ok so I tried using the scenario that the phusion blog wrote out but I
am still getting a permission denied. I have a freshly installed
ubuntu 11.10 system so now I am sure that whats going on is related to
one install and not several different install attempts. SOOOO here is
what I have.
Reference Tutorial:
http://www.google.com/url?sa=D&q=http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/&usg=AFQjCNGMN5oWTn9Sf7yHwK33id7p7PJ-KQ
The difference I did from this tutorial is that I wanted rails 1.9.2
to be the default since I won’t be running any 1.8.7 apps.
Install goes as follows:
-
Installed rvm (single user)
– For whatever reason when installed multi-user I was not able to
load rvm into my terminal after logging in/out
-
Installed ruby 1.9.2
– rvm install 1.9.2
-
Made 1.9.2 the default
– rvm --default use 1.9.2
-
Added the following to /etc/apache2/apache2.conf:
LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/
gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/
passenger-3.0.11
PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby
<VirtualHost *:80>
ServerName vmcilwain-dell
DocumentRoot /home/vmcilwain/sites/vell
Unfortunately for some reason I am not able get to rubygems.org or
github.com so I am not able to run bundle to get all of the necessary
gems installed. I get the following error:
Fetching source index for http://rubygems.org/
Fetching source index for http://github.com/
Could not reach rubygems repository http://rubygems.org/,
http://github.com/
The weird thing is that I am able to ping both domains. Also when I
create a brand new rails app bundle runs fine so I am curious about
what it does not like about my Gemfile this time around that it had no
problem with the last 5 times I have run it for that particular app.
With the fresh rails app that I have just created I am not able to
create the database using rake db create it is also giving me an
error:
[email protected]–D610:~/vell_new$ bundle exec rake db:create
rake aborted!
Could not find a JavaScript runtime. See
https://github.com/sstephenson/execjs
for a list of available runtimes.
(See full trace by running task with --trace)
I do have gem ‘execjs’ in my Gemfile so I am not sure exactly what I
am doing wrong in this case either.
On Dec 14, 2:35 pm, Jeff L. [email protected] wrote:
http://www.modrails.com/documentation/Users%20guide%20Standalone.html
passenger-standalone for both their dev and prod envs.
RewriteCond %{LA-U:REMOTE_USER} (.+)
Service Is Temporarily Unavailable (503)The Foo service is
/path/to/foo
### Note: currently serving foo rails app using passenger-standalone
ENVS = [ DEV_ENV, PROD_ENV ]
port = PORTS[env]
$ rvm [email protected] && ruby ./script/foo_env_server.rb development restart
render(:text=>"1\n")
for the proj, like unicorn or thin or …, it’s a lot easier to make
On Dec 14, 3:15 pm, Vell [email protected] wrote:
DocumentRoot "/home/lmcilwain/vell/current/public"
<Directory “/var/www/sites/vell/current/public”>
The fact that these two paths don’t match is suspicious to me. You’d
want both pointing at wherever it is on this that your app is.
Fred
–
You received this message because you are subscribed to the Google
Groups “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.