Ruby on Rails Tuesday, July 1, 2014



Yes, I did add that line in the .conf file inside sites folder and also add
RackEnv development

above PassengerRuby directive as below:

<VirtualHost ipaddress:80>
    ServerName ...
    ServerAdmin admin@example.com
    DocumentRoot "/Library/WebServer/most/public"
    DirectoryIndex index.html index.php /wiki/ /xcode/ default.html
    CustomLog /var/log/apache2/access_log combinedvhost
    ErrorLog /var/log/apache2/error_log
    <IfModule mod_ssl.c>
        SSLEngine Off
        SSLCipherSuite "ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM"
        SSLProtocol -ALL +SSLv3 +TLSv1
        SSLProxyEngine On
        SSLProxyProtocol -ALL +SSLv3 +TLSv1
    </IfModule>
    <Directory "/Library/WebServer/most/public">
        Options All -Indexes -ExecCGI -Includes +MultiViews
        AllowOverride None
        <IfModule mod_dav.c>
            DAV Off
        </IfModule>
        <IfDefine !WEBSERVICE_ON>
            Deny from all
            ErrorDocument 403 /customerror/websitesoff403.html
        </IfDefine>
    </Directory>
    RackEnv development
    PassengerRuby /usr/local/var/rbenv/versions/2.1.0/bin/ruby
</VirtualHost>

the error I got now seem to be something different...

integer 4294967294 too big to convert to `int' (RangeError)    /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:724:in `chown'    /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:724:in `block in remove_entry_secure'    /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:718:in `open'    /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:718:in `remove_entry_secure'    /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/utils/tmpio.rb:72:in `ensure in mktmpdir'    /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/utils/tmpio.rb:72:in `mktmpdir'    /usr/local/Cellar/passenger/4.0.45/libexec/lib/phusion_passenger/native_support.rb:147:in 
....
User and groups
uid=4294967294(nobody) gid=4294967294(nobody) groups=4294967294(nobody),12(everyone),61(localaccounts),
404(com.apple.sharepoint.group.4),403(com.apple.sharepoint.group.3),100(_lpoperator),
401(com.apple.sharepoint.group.1),402(com.apple.sharepoint.group.2)  
Environment variables



On Tuesday, July 1, 2014 11:33:54 AM UTC-4, Jim wrote:
On Tuesday, July 1, 2014 10:40:51 AM UTC-4, Liz Huang wrote:

Great, it seems that I got further, now I got error message

It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:

bundle install
....

You just need to get your PassengerRuby directive set up properly then.  That will need to be specified in your site configuration file in /Library/Server/Web/Config/apache2/sites/.   You can use the passenger utility:

passenger-config --ruby-command

which will show you what your PassengerRuby directive should look like.  I put that directive just above the closing </VirtualHost> tag in the site config file.  If you want to run in development mode, you will also need the "RackEnv development" directive.  

If you installed passenger using HomeBrew, then you do not want to list passenger as a requirement in your rails app Gemfile.  Personally, I only list app-specific gems in the Gemfile, and leave out the server-specific details like Passenger.

Jim

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5efad27e-86be-451c-bdd6-c763074a3408%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment