bundle exec rake time:zones:local
rake aborted!
LoadError: cannot load such file -- mysql2/mysql2
/usr/local/share/gems/gems/mysql2-0.3.17/lib/mysql2.rb:8:in `require'
/usr/local/share/gems/gems/mysql2-0.3.17/lib/mysql2.rb:8:in `<top (required)>'
/usr/local/share/gems/gems/bundler-1.7.10/lib/bundler/runtime.rb:76:in `require'
/usr/local/share/gems/gems/bundler-1.7.10/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/usr/local/share/gems/gems/bundler-1.7.10/lib/bundler/runtime.rb:72:in `each'
/usr/local/share/gems/gems/bundler-1.7.10/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/share/gems/gems/bundler-1.7.10/lib/bundler/runtime.rb:61:in `each'
/usr/local/share/gems/gems/bundler-1.7.10/lib/bundler/runtime.rb:61:in `require'
/usr/local/share/gems/gems/bundler-1.7.10/lib/bundler.rb:134:in `require'
/var/www/vhost/todo.tryx.org/TracksApp-tracks-f98d32c/config/application.rb:7:in `<top (required)>'
/var/www/vhost/todo.tryx.org/TracksApp-tracks-f98d32c/Rakefile:5:in `require'
/var/www/vhost/todo.tryx.org/TracksApp-tracks-f98d32c/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
gem list mysql
*** LOCAL GEMS ***
mysql2 (0.3.17, 0.3.16, 0.3.13)
/usr/lib64/gems/ruby/mysql2-0.3.13/lib/mysql2/mysql2.so
/usr/local/lib64/gems/ruby/mysql2-0.3.16/lib/mysql2/mysql2.so
/usr/local/lib64/gems/ruby/mysql2-0.3.17/lib/mysql2/mysql2.so
/usr/local/share/gems/gems/mysql2-0.3.16/ext/mysql2/mysql2.so
/usr/local/share/gems/gems/mysql2-0.3.17/ext/mysql2/mysql2.so
--
You received this message because you are subscribed to the Google Groups "TracksApp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tracksapp+...@googlegroups.com.
To post to this group, send email to trac...@googlegroups.com.
Visit this group at http://groups.google.com/group/tracksapp.
For more options, visit https://groups.google.com/d/optout.
Did `bundle install` execute without errors?
Try `bundle list mysql2` instead of `gem list mysql2`.
--
#!/usr/bin/env ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off). A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
# # Default log path, normal GC behavior.
# RailsFCGIHandler.process!
#
# # Default log path, 50 requests between GC.
# RailsFCGIHandler.process! nil, 50
#
# # Custom log path, normal GC behavior.
# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
If you are using Passenger you do not need FCGI. What does the relevant section of your Apache configuration look like?
DocumentRoot /var/www/vhost/todo.tryx.org/TracksApp-tracks-f98d32c/public
<Directory "/var/www/vhost/todo.tryx.org/TracksApp-tracks-f98d32c/public">
Options +Indexes +FollowSymLinks -MultiViews
AllowOverride all
Require all granted
</Directory>
# General Apache options
# If you're on Debian try the following instead of the fastcgi-script line:
# AddHandler fcgid-script .fcgi
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain requests
#
# Example:
# RewriteCond %{REQUEST_URI} ^/notrails.*
# RewriteRule .* - [L]
# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On
# If your Rails application is accessed via an Alias directive,
# then you MUST also set the RewriteBase in this htaccess file.
#
# Example:
# Alias /myrailsapp /path/to/myrailsapp/public
# RewriteBase /myrailsapp
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
#
# Example:
# ErrorDocument 500 /500.html
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
[Sun Jan 04 12:19:46.115223 2015] [fcgid:warn] [pid 3488] (104)Connection reset by peer: [client 10.1.1.34:49205] mod_fcgid: error reading data from FastCGI server
[Sun Jan 04 12:19:46.115324 2015] [core:error] [pid 3488] [client 10.1.1.34:49205] End of script output before headers: dispatch.cgi
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
--
What's in your Apache error log now?
The paths in your Tracks config section look OK. Are you sure Apache has mod_passenger enabled?
You should configure the .htaccess file to be ignored, because it's trying to load FCGI. Change to "AllowOverride None" in your Tracks <Directory> section.
Hi all,
The FCGI stuff is outdated. I’m not surprised it doesn’t work anymore. I’ve accepted patched from people who got it working, but I haven’t looked at it myself for a long while :-)
The recommended way to run Tracks is using Passenger. Perhaps we should remove the fcgi and .htaccess stuff to avoid confusion.
Reinier
--
DocumentRoot /var/www/vhost/todo.tryx.org/TracksApp-tracks-f98d32c/public
<Directory "/var/www/vhost/todo.tryx.org/TracksApp-tracks-f98d32c/public">
Options +Indexes +FollowSymLinks -MultiViews
AllowOverride all
Require all granted
</Directory>
http://todo.tryx.org/srvr-info
http://todo.tryx.org/
I am getting "default" content, meaning a request for "/" does not invoke the application, and I don't know why.http://todo.tryx.org/
--
What does your tracks config for passenger look like?
--
You definitely don't need to be looking at deploy.rb. It is for automated deployments using Capistrano, which is a sysops automation tool. Not what you're doing.
Right... O.K., so I'm left with a request for "tracks config for passenger". Where do I find that? Is this what you seek?
I'm going to go way out on a limb,and assume that it will be somewhere in the config/ directory, so here it is... http://todo.tryx.org/config/ temporarily available for your viewing pleasure.
Hi Chris,
I’m running tracks using SSL in a subdomain. My config is:
<VirtualHost *:443>
ServerName tracks.x.y:443
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/x.y.nu.pem
SSLCertificateKeyFile /etc/pki/tls/private/x.y.key
ErrorLog /var/www/tracks/log/apache.log
CustomLog /var/www/tracks/log/access_tracks_log combined
DocumentRoot /var/www/tracks/public
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/x-javascript text/javascript application/javascript text/css application/x-javascript
</VirtualHost>
So I think you need to wrap your config in a <VirtualHost> section
Reinier
Van: trac...@googlegroups.com [mailto:trac...@googlegroups.com] Namens Chris Miller
Verzonden: maandag 5 januari 2015 16:34
Aan: trac...@googlegroups.com
Onderwerp: Re: [Tracks-discuss] LoadError: cannot load such file -- mysql2/mysql2
Hi Folks,
--
Hi Chris,
If you want to server Tracks from Apache with Passenger, there is no need to run webbrick and no need to change the config to let webbrick serve static assets.
I’m using Fedora + Apache + Passenger + MySQL
Tracks is in /var/www/tracks
Databases point to MySQL, tested using
bundle exec rake db:migrate RAILS_ENV=production
(this will fail if the config is wrong)
I followed the installation instructions for passenger using passenger-install-apache2-module: in /etc/apache/conf.module.d I created 11-passenger.conf with the output of the install command (this could be different on your system/version of passenger)
LoadModule passenger_module /usr/local/share/gems/gems/passenger-4.0.53/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/share/gems/gems/passenger-4.0.53
PassengerDefaultRuby /usr/bin/ruby
</IfModule>
I added a tracks.conf to /etc/apache/conf.d with my VirtualHost settings, see my other email with the contents
Hope this helps
Reinier
Van: trac...@googlegroups.com [mailto:trac...@googlegroups.com] Namens Chris Miller
Verzonden: maandag 5 januari 2015 23:38
Aan: trac...@googlegroups.com
Onderwerp: Re: [Tracks-discuss] LoadError: cannot load such file -- mysql2/mysql2
Hi Folks,
--
If you want to server Tracks from Apache with Passenger, there is no need to run webbrick and no need to change the config to let webbrick serve static assets.
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
So I think you need to wrap your config in a <VirtualHost> section
Web application could not be startedYou have already activated rake 10.0.4, but your Gemfile requires rake 10.4.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
I'm getting an error from passenger:Web application could not be startedYou have already activated rake 10.0.4, but your Gemfile requires rake 10.4.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
gem install rake -v 10.4.2
gem install rack -v 1.4.5
module passenger 1.0;
require {
type httpd_sys_content_t;
type passenger_t;
type sysfs_t;
type hwdata_t;
class file execute;
class dir { read search };
}
#============= passenger_t ==============
allow passenger_t httpd_sys_content_t:file execute;
allow passenger_t hwdata_t:dir search;
allow passenger_t sysfs_t:dir read;
# checkmodule -M -m -o passenger.mod passenger.te
# semodule_package -o passenger.pp -m passenger.mod
# semodule -i passenger.pp
--
... and thanks for reporting back with what made you successful!
Great to hear you have things working,