Note that there are some explanatory texts on larger screens.

plurals
  1. POShared Server Dreamhost
    primarykey
    data
    text
    <p>I am trying to install an app on a shared server. If i understand properly because i am using a shared server, and that Dreamhost doesn't suppose rails 3.2.8 I must use FCGI, although i am not sure how to install and to make it run properly.</p> <p>From this tutorial <a href="http://wiki.dreamhost.com/Rails_3" rel="nofollow">http://wiki.dreamhost.com/Rails_3</a>.</p> <p>To my understand here what I did,</p> <ol> <li>In dreamhost, activate PHP 5.x.x FastCGI and made sure Phusion Passenger is unchecked</li> <li>Create an app on my localmachine</li> <li>Because rails doesn't create a dispatch and access file i create the two following file in my /public folder</li> </ol> <p>dispatch.fcgi #!/home/username/.rvm/rubies/ruby-1.9.3-p327/bin/ruby</p> <pre><code>ENV['RAILS_ENV'] ||= 'production' ENV['HOME'] ||= `echo ~`.strip ENV['GEM_HOME'] = File.expand_path('~/.rvm/gems/ruby 1.9.3-p327') ENV['GEM_PATH'] = File.expand_path('~/.rvm/gems/ruby 1.9.3-p327') + ":" + File.expand_path('~/.rvm/gems/ruby 1.9.3-p327@global') require 'fcgi' require File.join(File.dirname(__FILE__), '../config/environment') class Rack::PathInfoRewriter def initialize(app) @app = app end def call(env) env.delete('SCRIPT_NAME') parts = env['REQUEST_URI'].split('?') env['PATH_INFO'] = parts[0] env['QUERY_STRING'] = parts[1].to_s @app.call(env) end end </code></pre> <p>Then created the file .htaccess</p> <pre><code>&lt;IfModule mod_fastcgi.c&gt; AddHandler fastcgi-script .fcgi &lt;/IfModule&gt; &lt;IfModule mod_fcgid.c&gt; AddHandler fcgid-script .fcgi &lt;/IfModule&gt; Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi/$1 [QSA,L] ErrorDocument 500 "Rails application failed to start properly" </code></pre> <ol> <li>Uploaded to a folder and pointed to the public folder in dreamhost</li> <li>Made sure dispatch.fcgi has 777 for write</li> <li>ssh and run the following command in the public folder : .<code>/dispatch.fcgi</code></li> <li><p>Crossing my finger but it doesn't work I get the following errors</p> <p>./dispatch.fcgi: line 1: ENV[RAILS_ENV]: command not found ./dispatch.fcgi: line 1: =: command not found ./dispatch.fcgi: line 2: ENV[HOME]: command not found ./dispatch.fcgi: line 2: =: command not found ./dispatch.fcgi: line 3: syntax error near unexpected token <code>(' ./dispatch.fcgi: line 3:</code>ENV['GEM_HOME'] = File.expand_path('~/.rvm/gems/ruby 1.9.3-p327')'</p></li> </ol> <p>Doing wrong??? Oh and if i go on the server i get this <code>Rails application failed to start properly</code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload