Problem Installing Wagn on Debian Wheezy+discussion
Sorry I didn't mean to create this ticket before describing the problem in full.
When I run:
bundle install --without postgres:memcache:test:debug:development:assets
It fails with:
Gem::InstallError: rubyzip requires Ruby version >= 1.9.2.
But I have:
ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
And rubyzip does install OK:
gem install rubyzip -v '1.1.0'
Successfully installed rubyzip-1.1.0
1 gem installed
Installing ri documentation for rubyzip-1.1.0...
Installing RDoc documentation for rubyzip-1.1.0...
More details here: https://trac.transitionnetwork.org/trac/ticket/691
Any suggestions?
Hi Chris,
That's frustrating; rubyzip is certainly not central to Wagn.
Our intent has been to support ruby 1.8.7 and higher until Wagn 1.13.0. I will make sure this 1.9.2 dependency (via rubyzip) is removed in the next release.
However, after Wagn 1.13 we expect to start using Rails 4 libraries, which require ruby 1.9.3 or higher. Those libraries *are*, of course, quite central to Wagn, so that will mean Wagn, too, requires at least ruby 1.9.3. So if you're going to want to continue upgrading your site, you will probably need access to higher ruby versions soon enough.
My recommendation would be:
1. use rvm to manage your ruby versions. It's a powerful tool, and the more recent ruby versions have some genuine performance improvements that are worth having.
2. if you expect to stay on top of upgrades (recommended!), it will be easiest if you start using the new wagn gem installation rather than the current git-based approach. We haven't been promoting that mechanism broadly yet, but we expect to put out 1.13 in a week or so, and will begin promoting it then. We're using it for all the sites we host, and it's already six or seven point releases past the master branch, so it's ready for prime time and has some valuable improvements. And this will really be the only supported mechanism moving forward. See docs about how to install on our develop branch on GitHub.
3. I would not recommend serving with Webrick if you're expecting any real traffic. The new gem installation mechanism makes Wagn much more like a standard rack app (with the one exception that you will need to symlink a public directory to the public directory in the gem; that's one wart we wanted to fix before promoting the gem), which in turn makes it much easier to serve with passenger.
yeah, that's odd. it seems like bundle must be executing in the context of an earlier ruby?
what does `bundle exec ruby -v` give you?
bundle exec ruby -v
Could not locate Gemfile
But I have done the gem install as you suggested, I onlt tried the git install as I didn't think the gem install was working, but it was simply slow, when I run it with --verbose and also sort the rmagick issues it all works. More details, if you are interested: https://trac.transitionnetwork.org/trac/ticket/691#comment:6
Thanks for your help.
s/onlt/only/ and s/sort/sorted/ in comment above.
I have installed wagn, following the instructions at https://github.com/wagn/wagn/tree/develop but appear to have a problem with the Nginx config, I have this:
server {
listen 80;
server_name wagn-phusion.penguin.webarch.net;
access_log /var/log/nginx/wagn-phusion.access.log;
error_log /var/log/nginx/wagn-phusion.error.log info;
root /web/patterns.transitionresearchnetwork.org/patterns;
passenger_enabled on;
passenger_ruby /usr/bin/ruby;
passenger_show_version_in_header on;
}
However the front page is a 403:
http://wagn-phusion.penguin.webarch.net/
2014/03/06 11:55:57 [error] 7357#0: *20 directory index of "/web/patterns.transitionresearchnetwork.org/patterns/" is forbidden, client: XX.XX.XX.XX, server: wagn-phusion.penguin.webarch.net, request: "GET / HTTP/1.1", host: "wagn-phusion.penguin.webarch.net"
And note that the Nginx headers don't have the Phusion Passenger version string:
Server: nginx/1.4.4
But we do that the Phusion version of Nginx:
dpkg --status nginx-extras | grep Version
Version: 1:1.4.4-2.4.0.37~wheezy1
dpkg --status nginx-extras | grep Maintainer
Maintainer: Phusion
So, I'm not sure what to try next, is there a Wagn Nginx Phusion Passenger config somewhere I could look at?
More info here: https://trac.transitionnetwork.org/trac/ticket/691#comment:7
Ethan, above you said: "you will need to symlink a public directory to the public directory in the gem" above, perhaps this is the problem, could you give me some more clues regarding this symlink?
FWIW:
bundle exec ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
BTW this: https://github.com/wagn/wagn/tree/develop links to a page that doesn't exist:
Platform-specific details at: www.wagn.org/wagn/installation_1_8+Platform_Notes
I haven't actually used nginx very much, but here's my first guess:
1. the "root" of the website has to be readable by the user running nginx. (www-data?)
2. if it's like apache, then the root refers not to the root of the wagn app (/web/patterns.transitionresearchnetwork.org/patterns), but to the root directory of the website, which should actually be /web/patterns.transitionresearchnetwork.org/patterns/public
3. that "public" at the end should be a symlink to the gem's public dir. to find that dir, go to the wagn app root and type `bundle show wagn`. that will give you the root of the gem; the symlink should be to the public directory in that folder.
it looks like you already figured out that "bundle exec" needs to be run from a directory with a Gemfile.
thanks for pointing out the broken link.
Thanks Ethan that's just what I needed to know, only issue now is the images:
- http://wagn-phusion.penguin.webarch.net/
They are in /web/patterns.transitionresearchnetwork.org/patterns/local/files do I need to set these up to be served directly by Nginx?
try moving them from ...patterns/local/files to ...patterns/files
(no, they shouldn't be served directly; wagn handles permissions on those and then tells the server where to find them)
Thanks for all the help Ethan, that did the trick, once Tom has checked the site out I'll replace the WEBrick version of the site with this Phusion version.
Awesome!