By ebeecroft
I been working on this problem for a while and so far haven’t been able to solve this. Everything appears to have installed correctly and I double checked everything. Even going so far as to create a detailed Rails deployment plan. So far everything has installed successfully but I can’t seem to get my rails website to actually do what it is supposed to do.
Any help would be greatly appreciated. I really want this website to work so badly and it is frustrating to me that the deployment process is hitting a wall. I might be missing something but I believe this is a complete list of tasks that I ran.
This is my website that should be displaying the homepage with a bat on it but isn’t http://162.243.59.103/
Here are the tasks I ran to get rails ready. PS: yes Rails is installed. Step 1 Rails ready
wget --no-check-certificate https://raw.github.com/joshfng/railsready/master/railsready.sh && bash railsready.sh
RVM install(option 2)
Step 2 Install Ruby
rvm install 1.9.3
rvm use --default 1.9.3
Step 3 Install Rails
gem install rails -v=3.2.14
Step 4 Install git
apt-get install git
Step 5 Install Rails/Ruby Packages
apt-get install nodejs
gem install execjs
Step 6 Install prequisites for passenger
apt-get install libcurl4-openssl-dev
apt-get install apache2-threaded-dev
Steps 7 setup passenger
gem install passenger
apt-get install libapache2-mod-passenger
passenger-install-apache2-module
Step 8 expand swap space
sudo dd if=/dev/zero of=/swap bs=1M count=1024
sudo mkswap /swap
sudo swapon /swap
Step 9 rerun passenger install command
passenger-install-apache2-module
Step 10 Apache config
sudo nano /etc/apache2/apache2.conf LoadModule passenger_module /home/username/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/ext/apache2/mod_passenger.so PassengerRoot /home/username/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12 PassengerRuby /home/username/.rvm/wrappers/ruby-1.9.3-p194/ruby
Step 11 Restart Apache
sudo service apache2 restart
–Fails here—
Step 12 Create enable site cd /etc/apache2/sites-enabled/
cp 000-default duelingpets.net
sudo nano duelingpets.net
<VirtualHost *:80> PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p484/ruby ServerAdmin webmaster@duelingpets.net ServerName duelingpets.net DocumentRoot /var/www/duelingpets.net/public <Directory /var/www/duelingpets.net> AllowOverride None Options -MultiViews </Directory> </VirtualHost>
Step 13 Restart Apache again
sudo service apache2 restart
---------Fails again----
Step 14 Removed default ruby from config
mkdir /var/www/duelingpets.net
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p484/gems/passenger-$ <IfModule mod_passenger.c> PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.36
</IfModule>
Step 15 Restart apache again
sudo service apache2 restart
Step 16 Configure sites-available for duelingpets.net
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/duelingpets.net
cd /etc/apache2/sites-available/
nano duelingpets.net
<VirtualHost *:80> ServerAdmin webmaster@duelingpets.net ServerName duelingpets.net ServerAlias www.duelingpets.net DocumentRoot /var/www/duelingpets.net/public
or
ServerName www.yourhost.com
DocumentRoot /somewhere/public <Directory /somewhere/public>
AllowOverride all
Options -MultiViews </Directory> </VirtualHost>
Step 17 Restart Apache
sudo service apache2 restart
Step 18 Enable site
sudo a2ensite your_app_name
sudo a2ensite duelingpets.net
----Fails----
Step 19 Remove file from site-enabled
cd /etc/apache2/sites-enabled
Step 20 Enable site trial 2
sudo a2ensite duelingpets.net
Step 21 Reload Apache
service apache2 reload
Step 22 Turn on passenger
sudo a2enmod passenger
Step 23 Reload Apache 2
service apache2 reload
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
What’s the output of <pre>ls /etc/apache2/sites-enabled</pre>? You might want to replace <code>ServerAlias www.duelingpets.net</code> with <code>ServerAlias www.duelingpets.net 162.243.59.103</code>.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.