Project

General

Profile

Redmine on OSX Server (Leopard)

Added by Cristiano Bianchi almost 16 years ago

Hi everyone,

I was wondering if I could get some help. I am trying to install Redmine on Apache 2.2.8 on a OSX Server (Leopard) machine. The application works fine if I test it using the WEBrick web server, issuing ruby script/server -e production. I am following the instructions on: http://plungeintomac.com/blog/redmine-on-apache/

The root folder is in /Users/Shared/Redmine
I have created a Symlink from /Users/Shared/Sites/redmine -> /Users/Shared/Redmine/public

Since I have an Apache Server and fast_cgi enables, I would have liked to run it through it. Whatever I try, I get the error: The application could not be started.

[Tue Dec 30 01:50:09 2008] [warn] FastCGI: (dynamic) server "/Users/Shared/Sites/redmine/dispatch.fcgi" restarted (pid 21693)
/Library/Ruby/Gems/1.8/gems/rails-2.1.2/lib/initializer.rb:309:in `read': No such file or directory - /Users/Shared/Sites/config/environments/production.rb (Errno::ENOENT)
    from /Library/Ruby/Gems/1.8/gems/rails-2.1.2/lib/initializer.rb:309:in `load_environment'
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /Library/Ruby/Gems/1.8/gems/rails-2.1.2/lib/initializer.rb:302:in `load_environment'
    from /Library/Ruby/Gems/1.8/gems/rails-2.1.2/lib/initializer.rb:121:in `process'
    from /Library/Ruby/Gems/1.8/gems/rails-2.1.2/lib/initializer.rb:97:in `send'
    from /Library/Ruby/Gems/1.8/gems/rails-2.1.2/lib/initializer.rb:97:in `run'
    from /Users/Shared/Sites/redmine/../config/environment.rb:20
    from /Users/Shared/Sites/redmine/dispatch.fcgi:21:in `require'
    from /Users/Shared/Sites/redmine/dispatch.fcgi:21

I cannot understand why the application searched

/Users/Shared/Sites/config/environments/production.rb

when the file would have been in
/Users/Shared/Redmine/config/environments/production.rb

Then I tried using Modrails Passenger, still with no luck. Passenger loads, but it complains that the application contains an error:

Error message: bignum too big to convert into `long'
Exception class: RangeError
Application root:/Users/Shared/Redmine

Is this enough information? What am I doing wrong?

Thanks for your help, Cristiano


Replies (6)

RE: Redmine on OSX Server (Leopard) - Added by Anonymous almost 16 years ago

The reason it is looking in 'Sites/config/ is because of the bottom 3 lines of your post:

    from /Users/Shared/Sites/redmine/../config/environment.rb:20
    from /Users/Shared/Sites/redmine/dispatch.fcgi:21:in `require'
    from /Users/Shared/Sites/redmine/dispatch.fcgi:21

It starts in Sites/redmine then looks in Sites/redmine/../config/environment.rb which is Sites/config/environment.rb. Whether this is a bug in redmine or you need to change your setup, I don't know.

I run on OS X server but I've got mongrel running via launchd and apache acting as a proxy on to 127.0.0.1:3000 and it works fine for me.

Cheers

Russell

RE: Redmine on OSX Server (Leopard) - Added by CJ F almost 16 years ago

I have noticed the same problem trying to follow the steps given at that website. I think redmine might suffer from a problem that is discussed here...
http://www.mail-archive.com/rails-core@lists.rubyonrails.org/msg00212.html

Basically, it seems to be a problem of setting up the links in the described manner and how that situation is handled. I don't know if it is a redmine thing or a rails thing, but it is an issue nonetheless.

If you come up with a fix, I'd love to hear it. In the meantime, I'm going to try lauchd+apache proxy

RE: Redmine on OSX Server (Leopard) - Added by CJ F almost 16 years ago

I have gone so far as to install passenger [http://www.modrails.com] in an effort to get it working purely with apache, but I can only make it work if it is the document root. That is, it only works if it is the only thing apache serves. I can't set it up as a sub uri.

Anyway, that doesn't really suite my needs so I don't know what I'm going to do. Frankly, I'm averse to running it as Russell is simply because I'm tired of trying.

<sigh/>

RE: Redmine on OSX Server (Leopard) - Added by CJ F almost 16 years ago

SOLVED!!!!

For the complete rundown, go here .

Short version:

The instruction Christiano originally followed are 90% there. I followed them too. Then I stumbled across the link provided here and combined the two. Anyway, into my httpd.conf, I inserted something like:

<VirtualHost *:80>
    ServerName  my.example.com
    <Directory /Library/WebServer/Documents/redmine>
               AllowOverride All
               Options Indexes FollowSymLinks MultiViews
               Order allow,deny
               Allow from all
    </Directory>
    RailsBaseURI /redmine
    RailsEnv production
</VirtualHost>

My layout has redmine-0.8 in /Library/WebServer/redmine-0.8 and there is a in /Library/WebServer/Documents that was created like:

ln -s /Library/WebServer/redmine-0.8/public redmine

So this combined with the original instructions worked for me on OS X 10.5 Leopard. For what it's worth, I didn't need step 3 on my provided link.

RE: Redmine on OSX Server (Leopard) - Added by Anonymous almost 16 years ago

CJ F wrote:

Frankly, I'm averse to running it as Russell is simply because I'm tired of trying.

I can post the appropriate launchd.plist file and apache configs to do this if you want. It really isn't that hard. It also has the advantage that you can run mongrel_rails as whatever user you like so you don't have to give www full control of the redmine folder. Just read access to the public folder. I run mongrel_rails as my user so I don't have to change permissions at all.

Cheers

Russell

RE: Redmine on OSX Server (Leopard) - Added by CJ F almost 16 years ago

Actually it might be nice to have for reference, but I finally got it working. Thanks though!

    (1-6/6)