HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine)
Added by Jack Kurzecki almost 15 years ago
For all Windows users wanting to quickly get started using Redmine:
HowTo Install Redmine in a sub-URI on Windows with Apache
This wiki page covers a complete installation process on Windows XP/2003 x86/x64:
- Install Apache HTTP server 2.2.x
- Install MySQL 5.1.x
- Install MySQL GUI Tools for MySQL 5.0
- Install Ruby 1.8.7
- Install RubyGems
- Additional gems
- Install Rake
- Install Rails
- Install Mongrel
- Install mysql gem
- Install mongrel-service + win32-service gems
- Install Redmine
- Setup windows services
- Configure Apache 2.2.x as proxy to Mongrel cluster
Replies (33)
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Mischa The Evil almost 15 years ago
Nice one. Thanks for sharing it in such a way.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Tilo Meisel almost 15 years ago
First of all, thanks a lot for this installation overview.
I did not installed Redmine and I have not used Ruby/Rails/... before. We just using the Bitnami virtual machine version right now. But I would like to have a own installation.
Because it was not working I already tried a second time without success.
(Redmine 0.8.7, Ruby 1.8.7 on Windows Server 2008 R2)
Following your guide I have/had the following issues.
regarding "Install Ruby 1.8.7"
- not important but it is a little bit strange/irritating that the installed files from v1.8.6 are newer (11'2009) than v1.8.7 (08'2008)
- I am not sure if step 3 makes sense at this point because you need to at least have the file "zlib.dll" installed before
Error message:
C:\webserver\railsapps>gem list C:/webserver/ruby/lib/ruby/1.8/i386-mswin32/zlib.so: 126: The specified module could not be found. - C:/webserver/ruby/lib/ruby/1.8/i386-mswin32/zlib.so (Load Error) ...
- if I am not wrong you do not need to download zlib package (step 7), the "zlib1.dll" file which will be installed to the bin directory by the Ruby installer is the same version (1.2.3.0) as the one you can download (I also compared the file content)
- after creating a copy of "zlib1.dll" and renaming it to "zlib.dll" the command "gem list" works
- but the list should be still empty if it is a fresh installation
regarding "Install RubyGems"
- (now you need the directory "railsapps")
- after the setup has been executed, I thought that I should see an installed gem if I run "gem list", but there is still nothing
- if I execute "gem update --system" I get an error message that the file "SSLEAY32.dll" is missing
- I found a working solution for this issue here:
http://alwaysthecritic.typepad.com/atc/2009/03/install-ruby-191-on-windows.html
regarding "Install mysql gem"
- the gem installation works but for the following documentation I get a lot of error messages, I have no idea if this could be a problem later on
Message:
Successfully installed mysql-2.8.1-x86-mswin32 1 gem installed Installing ri documentation for mysql-2.8.1-x86-mswin32... No definition for next_result No definition for field_name No definition for field_table No ...
regarding "Install Redmine"
- (step 3) I guessed you mean with "GUI Tools" and "Open a new script tab" using the MySQL Administrator and then Tools -> MySQL Command Client
- (step 6) here I get a real problem
C:\webserver\redmine>rake config\initializers\session_store.rb --trace (in C:/webserver/redmine) rake aborted! Don't know how to build task 'config\initializers\session_store.rb' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1728:in `[]' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/webserver/ruby/bin/rake:19:in `load' C:/webserver/ruby/bin/rake:19
- I checked the gems
C:\webserver\redmine>gem list *** LOCAL GEMS *** actionmailer (2.1.2) actionpack (2.1.2) activerecord (2.1.2) activeresource (2.1.2) activesupport (2.1.2) cgi_multipart_eof_fix (2.5.0) gem_plugin (0.2.3) mongrel (1.1.5) mongrel_service (0.3.4) mysql (2.8.1) rails (2.1.2) rake (0.8.7) win32-service (0.5.2)
- then, because I could not find any solution on the Internet, I tried just to run the next commands with following result
C:\webserver\redmine>set RAILS_ENV=production C:\webserver\redmine>rake db:migrate --trace (in C:/webserver/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! Missing session secret. Please run 'rake config/initializers/session_store.rb' to generate one C:/webserver/redmine/app/controllers/application.rb:29 C:/webserver/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' C:/webserver/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:102:in `require_or_load_without_engine_additions' C:/webserver/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:139:in `require_or_load' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:61:in `depend_on' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:457:in `require_dependency' C:/webserver/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:18:in `define_dispatcher_callbacks' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/callbacks.rb:177:in `call' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/callbacks.rb:177:in `evaluate_method' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/callbacks.rb:161:in `call' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `each' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `send' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/callbacks.rb:272:in `run_callbacks' C:/webserver/redmine/vendor/rails/railties/lib/initializer.rb:493:in `send' C:/webserver/redmine/vendor/rails/railties/lib/initializer.rb:493:in `prepare_dispatcher' C:/webserver/redmine/vendor/rails/railties/lib/initializer.rb:155:in `process' C:/webserver/redmine/vendor/rails/railties/lib/initializer.rb:97:in `send' C:/webserver/redmine/vendor/rails/railties/lib/initializer.rb:97:in `run' C:/webserver/redmine/config/environment.rb:20 C:/webserver/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' C:/webserver/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in' C:/webserver/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require' C:/webserver/redmine/vendor/rails/railties/lib/tasks/misc.rake:3 C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' C:/webserver/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain' C:/webserver/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/webserver/ruby/bin/rake:19:in `load' C:/webserver/ruby/bin/rake:19
- I also tried to use rails 2.2.2, but I am getting the same error (I uninstalled all 2.2.2 gems again)
- trying to understand the rake config files did not helped me
- checking all the information on the Internet, including the Redmine site, I could not find a solution so far
- another question: Where can I check which release version (rXXXX) is v0.8.7? checking the Upgrading guide it tells you that generating this session_store.rb file is required if you use Redmine at Revision r2493 or above. Fine, but how do I know which is v0.8.7? Changelog does not show it. Going trough all the revisions in the repository is not really helpful.
Right now I do not know what to do to fix it. Any help would be much appreciated. Thanks in advance.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Jack Kurzecki almost 15 years ago
Tilo,
regarding Install Ruby 1.8.7¶
- It seems to me that step1 has not installed properly on your computer. Maybe some default options were unchecked? It is not a big deal, less to remove in following steps.
- At this point we have version 1.8.6 installed so running gem list in step3 should give you a valid output.
- I removed all of the "Rails 2.1.2" gems before overwriting Ruby 1.8.6 with 1.8.7 binaries in step 4
- You are right about copying "zlib1.dll" and renaming it to "zlib.dll" - same thing
regarding Install RubyGems¶
- I never got any errors about missing "SSLEAY32.dll" probably because I also have PHP installed on the same box which comes with it. I will test this some day.
regarding Install mysql gem¶
- The gem was made for MySQL 5.0 so there are some additional features in 5.1 which will not be defined in this gem, but it does not cause any problems (AFAIK, running smoothly for 2 months)
regarding Install Redmine¶
- I actually meant "log into MySQL using 'MySQL Query Browser' as 'root'", sorry for not making it more clear. You could also use command prompt or another tool, such as phpMyAdmin.
- I installed redmine into C:\webserver\railsapps\redmine\ but that shouldn't make a difference (as long as you remember to modify path in following steps accordingly)
- My "C:\webserver\railsapps\redmine\config\database.yml" looks like this:
production: adapter: mysql database: redmine host: localhost username: redmine password: my_password encoding: utf8
and I run the rake commands from "C:\webserver\railsapps\redmine\" directory.
- you have to be at the root of redmine when executing "rake config\initializers\session_store.rb", so you should have "config" and all other directories in the directory you are executing this command from.
The error you described looks like you might have something like "C:\webserver\redmine\redmine\" and are executing from "C:\webserver\redmine\"
I hope this helps you get through the rest of this installation.
I can't remember the exact revision number of Redmine 0.8.7, but session_store.rb is definitely required.
You could get the latest revision using a tool such as TortoiseSVN (not from your server, use a toy box) or wait a couple of days for 0.9 to be released.
I will update the guide (including some of your findings) once 0.9 is officially released.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Daniel LaPan almost 15 years ago
Thanks for this installation guide. It has been a real help.
Just a note this is my first time using rudy. Basically I have been looking for project management software that will help out a small start-up. On to the issue.
While going through the install I recieved no errors. However when I try to run redmine I get an HTTP 403 error : This error (HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, but it does not have permission to view the webpage. Any suggestions who be helpfull. Below are some apache log files and my gems list.
Here is my apache access log:
127.0.0.1 - - [30/Jan/2010:10:56:13 -0500] "GET / HTTP/1.1" 200 44
127.0.0.1 - - [30/Jan/2010:10:56:47 -0500] "GET /redmine: HTTP/1.1" 403 210
127.0.0.1 - - [30/Jan/2010:10:57:11 -0500] "GET /redmine: HTTP/1.1" 403 210
Here is my apache error log:
[Sat Jan 30 11:27:04 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sat Jan 30 11:27:04 2010] [notice] Child 452: Exit event signaled. Child process is ending.
[Sat Jan 30 11:27:05 2010] [notice] Child 452: Released the start mutex
[Sat Jan 30 11:27:06 2010] [notice] Child 452: All worker threads have exited.
[Sat Jan 30 11:27:06 2010] [notice] Child 452: Child process is exiting
[Sat Jan 30 11:27:06 2010] [notice] Parent: Child process exited successfully.
[Sat Jan 30 11:27:13 2010] [notice] Apache/2.2.14 (Win32) configured -- resuming normal operations
[Sat Jan 30 11:27:13 2010] [notice] Server built: Sep 28 2009 22:41:08
[Sat Jan 30 11:27:13 2010] [notice] Parent: Created child process 52904
[Sat Jan 30 11:27:13 2010] [notice] Child 52904: Child process is running
[Sat Jan 30 11:27:13 2010] [notice] Child 52904: Acquired the start mutex.
[Sat Jan 30 11:27:13 2010] [notice] Child 52904: Starting 64 worker threads.
[Sat Jan 30 11:27:13 2010] [notice] Child 52904: Starting thread to listen on port 80.
[Sat Jan 30 11:27:37 2010] [error] [client 127.0.0.1] (20024)The given path is misformatted or contained invalid characters: Cannot map GET /redmine: HTTP/1.1 to file
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\webserver>cd railsapps\redmine
C:\webserver\railsapps\redmine>gem list
- LOCAL GEMS ***
actionmailer (2.1.2)
actionpack (2.1.2)
activerecord (2.1.2)
activeresource (2.1.2)
activesupport (2.1.2)
cgi_multipart_eof_fix (2.5.0)
gem_plugin (0.2.3)
mongrel (1.1.5)
mongrel_service (0.3.4)
mysql (2.8.1)
rails (2.1.2)
rake (0.8.7)
win32-service (0.5.2)
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Jack Kurzecki almost 15 years ago
I have updated this guide for Redmine 0.9.1 deployment and also added more details:
HowTo Install Redmine in a sub-URI on Windows with Apache
Daniel Lopez: It looks like your C:\webserver\apache\conf\httpd-proxy-mongrel.conf was not picked up by Apache. Maybe try to redo this procedure with Redmine 0.9.1
Do you get anything when you go to http://127.0.0.1:3001 ?
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Tilo Meisel almost 15 years ago
Hi Jack,
thanks a lot for your fast and detailed replay. Unfortunately I did not find the time to try again and respond earlier.
Because I am using a virtual machine for testing the installation, I went back to the system status before the Redmine installation and started again.
What did I different this time:
I installed MySQL Workbench 5.1.18a instead of MySQL GUI Tools because of the EOL Announcement for the Tools. (It should not really matter.)
http://dev.mysql.com/downloads/gui-tools/5.0.html
Install directory:
c:\webserver\MySQL_Workbench
I installed Ruby v1.8.6 only changing the installation path following your guide and enabling the following options.
- Add Ruby executables to your PATH
- Associate .rb and .rbw files with this Ruby installation
Now running 'gem list' does not give me an error about the zlib module. But after the update to v1.8.7 a copy of zlib1.dll and renaming it to zlib.dll is needed. (But I guess you have known that already.)
To fix the problem with the missing SSLEAY32.dll I just installed this time the lastest PHP package php-5.2.12-win32-installer.msi (http://www.php.net/downloads.php). The Curl extension comes with the needed DLLs.
Following your structure I installed to:
C:\webserver\PHP
Regarding the Redmine installation step, I still had the same error message by running the command:
C:\webserver\redmine>rake config\initializers\session_store.rb --trace (in C:/webserver/redmine) rake aborted! Don't know how to build task 'config\initializers\session_store.rb' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1728:in `[]' C:/webserver/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' ...
Because of the error messages, I tried the command again exchanging the backslashs to forwardslashs:
rake config/initializers/session_store.rb
And voila, it is working now, I got my needed session file. :-)
The next step gave me another error message:
rake db:migrate rake aborted! Mysql::Error: query: not connected: CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
For this I found a solution here:
http://halyph.blogspot.com/2009/08/rails-23-migration-issues-with-mysql_26.html
http://forums.aptana.com/viewtopic.php?f=20&t=7563&p=27407&hilit=libmysql.dll#p27407
In short ... downloading libSQL.dll from the following link and coping it to c:\webserver\ruby\bin is fixing this problem.
http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll
Few more steps and my first own Redmine installation was working :-)
Maybe you can add some this troubleshooting steps.
For me as the next step I will try your updated guide with the new Redmine version.
And of course if this running I will start to use Redmine ...
Thanks again for your work.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Tom Hatzopoulos almost 15 years ago
Greetings Jack and Tilo,
Jack, thank you for putting together this how-to for Windows. Following the your previous version to install 0.8.7 gave me the same errors that Tilo had. With your new version for 0.9.1, including PHP I was able to get to the same point as Tilo was. Progress, but not quite there.
Tilo, your addition to add libmySQL.dll and with changing the backslash to forwardslash allowed me to complete the install, thank you.
However, upon restarting apache as stated at the end of the how-to, apache crashed. Turns out to be a problem between PHP and Apache. I Googled the error I was getting (php5ts.dll) and found numerous solutions. The most common one, and the one that worked for me was to edit c:\webserver\PHP\php.ini and comment out this line:
Original
[PHP_MSSQL]
extension=php_mssql.dll
New
[PHP_MSSQL]
;extension=php_mssql.dll
Upon doing that, Apache starts and I now have the latest stable version of Redmine. Thank you to both of you for sharing your knowledge.
My OS: Windows XP SP3
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Jack Kurzecki almost 15 years ago
Thanks Tilo and Tom.
I have added your findings and workarounds into the HowTo and also linked to this forum thread.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Chaoqun Zou over 14 years ago
Hi, I have found that the apache cluster conf may be required to change from
ProxyPass /redmine balancer://redmine_cluster
ProxyPassReverse /redmine balancer://redmine_cluster
to
ProxyPass /redmine balancer://redmine_cluster/
ProxyPassReverse /redmine balancer://redmine_cluster/
(add a / to the end of line)
to avoid the following errors:
proxy: No protocol handler was valid for the URL
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Dylan Y over 14 years ago
I am following exactly the steps, and it works. But strange is after one day, Apache will give me this error:
Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /projects/mds/issues. Reason: Error reading from remote server
I was using Apache 2.2.14, but upgrade to 2.2.15 the problem still exist. After restart Apache service it will work for one day then gave me proxy Error in the next day. Anyone experience this before?
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Nikolay Kotlyarov over 14 years ago
Redmine::Utils::relative_url_root = "/redmine"
Mongrel_rails service "--prefix" directive does NOT work with Rails 2.3.x
Found an issue with using relative_url_root in environment.rb.
In my case the prefix was tracker
and an attempt to go to administrative area and click Trackers
caused error.
I think this is because of greedy regexp that was matching
[protocol://server:port/tracker/tracker]s
instead of
[protocol://server:port/tracker]/trackers
Simple Workaround¶
The way i made mongrel_service "--prefix" directive work with rails 2.3 was changing line 151 inRuby\lib\ruby\gems\1.8\gems\mongrel-1.1.5-x86-mingw32\lib\mongrel\rails.rb
from
ActionController::AbstractRequest.relative_url_root = ops[:prefix] if ops[:prefix]to
ActionController::Base.relative_url_root = ops[:prefix] if ops[:prefix]
Better workaround¶
You can also find a patch here: http://github.com/fauna/mongrel/issues#issue/2
It covers support for older versions of rails:
151c151,158 < ActionController::AbstractRequest.relative_url_root = ops[:prefix] if ops[:prefix] --- > # hack to deal with removal of ActionController::AbstractRequest > if defined? ActionController::AbstractRequest > # Rails < 2.3 > ActionController::AbstractRequest.relative_url_root = ops[:prefix] if ops[:prefix] > else > # Rails >= 2.3 > ActionController::Base.relative_url_root = ops[:prefix] if ops[:prefix] > end
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Nikolay Kotlyarov over 14 years ago
How to configure a rails app (redmine) to run as a service on windows?
using webrick and thin:
http://stackoverflow.com/questions/877943/how-to-configure-a-rails-app-redmine-to-run-as-a-service-on-windows
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Daniel Blendea over 14 years ago
Hello,
I tried to install mongrel_service from this gem mongrel_service-0.3.4-i386-mswin32.gem
but I get this error:
D:\*\redmine>gem install mongrel_service
Building native extensions. This could take a while...
ERROR: Error installing mongrel_service:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for RegisterServiceCtrlHandlerEx()... no
checking for EnumServicesStatusEx()... no
checking for QueryServiceStatusEx()... no
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/win32-service-0.5.2 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/win32-service-0.5.2/gem_make.out
- LOCAL GEMS ***
actionmailer (2.3.8, 2.3.5)
actionpack (2.3.8, 2.3.5)
activerecord (2.3.8, 2.3.5)
activeresource (2.3.8, 2.3.5)
activesupport (2.3.8, 2.3.5)
cgi_multipart_eof_fix (2.5.0)
fxri (0.3.6)
fxruby (1.6.16 x86-mswin32-60)
gem_plugin (0.2.3)
hpricot (0.6.164 mswin32)
log4r (1.0.5)
mongrel (1.1.5 x86-mingw32)
mysql (2.8.1 x86-mingw32)
ptools (1.1.6)
rack (1.1.0, 1.0.1)
rails (2.3.8, 2.3.5)
rake (0.8.7, 0.8.1)
ruby-opengl (0.60.0 i386-mswin32)
test-unit (2.0.1)
win32-api (1.2.1 x86-mswin32-60, 1.2.0 x86-mswin32-60)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.5)
win32-file-stat (1.3.1)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4)
windows-pr (0.9.3)
I have previously installed and used mongrel, but this is the first time I get the error.
googling for the error message, it seems that I need a Linux dev environment?
Do you know how can I solve it?
Thanks,
Dan
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Jean-Baptiste Henry over 14 years ago
First of all, this HowTo is usefull !
many many thanks.
I have an old 0.6.4 redmine on Ubuntu.
Many things force me to transfert it on windows server 2003.
Everything works well.
But, when i change C:\webserver\railsapps\redmine\config\environment.rb and add
Redmine::Utils::relative_url_root = "/redmine"
i get an Proxy error.
I think redmine 0.6.4 doesn't understand it.
i really don't know how to make it work.
It's not big deal, because with http://localhost:3001 it works perfectly.
It's just in case someone may need it.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Jack Kurzecki over 14 years ago
I have updated HowTo Install Redmine in a sub-URI on Windows with Apache for Redmine 1.0.0 + installations.
It has been tested on Windows 2003 x64 with r3919 and on Windows XP SP3 x86 with a downloaded package 1.0.0
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Neal Bharadwaj over 14 years ago
Any possibility someone can do a guide on upgrading from .9.x to 1.0 on windows? I was trying to yesterday but had no luck
Thanks,
Neal
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Simon Coffey over 14 years ago
Hi all, and first of all thanks to Jack for the very useful info.
However, I think I've run in to a similar problem to Jean-Baptiste. Having followed the instructions and set the line
Redmine::Utils::relative_url_root = "/redmine"
in environment.rb, I can access the main index of my redmine installation fine at "http://localhost/redmine". However, when I try to click any link, I get the following (or similar):
Processing ApplicationController#index (for 127.0.0.1 at 2010-08-25 11:37:01) [GET] ActionController::RoutingError (No route matches "//admin" with {:method=>:get}):
The double slash seems to hint at what's going on, but I can't work out how it's getting in there (it's not in the request URL, certainly). If I replace the line in environment.rb with
Redmine::Utils::relative_url_root = "/redmine/"
(i.e. adding a trailing slash), I don't even get the index page, with the error reading
ActionController::RoutingError (No route matches "//" with {:method=>:get}):
Being a complete ruby novice, I don't really know where to look from here - does anyone have an idea either what's going wrong, or where I could look next? Any help would be greatly appreciated.
Simon
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Jean-Baptiste Henry over 14 years ago
Simon,
what version of redmine do you have ?
mine is 0.6.4. a very old one.
if you have a newer version, maybe it's apache/mongrel wich are not correctly configure.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Simon Coffey over 14 years ago
Hi Jean-Baptiste,
Gah! Forgot the version numbers, thanks for reminding me.
Ruby: 1.8.7
Rack: 1.0.1
Rails: 2.3.5
Rake: 0.8.7
Mongrel: 1.1.5
Mongrel-service: 0.3.4
Redmine: 1.0.1 stable
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Jean-Baptiste Henry over 14 years ago
To Neal Bharadwaj
I've done 0.9.5 to 1.0.1 without any problem on windows server 2003.
i've followed this RedmineUpgrade.
Only the mysql command doesn't work, i've used MysqlWorkbench, as this HowTo tells me to.
To Simon Coffey
I haven't followed the "new" HowTo, since i've installed 0.9.5, the HowTo was a bit different.
The only problem i have was with PHP.
If PHP wasn't install, everything works fine.
My problem was only the older version.
Since i've almost copied manually the information from 0.6.4 to 0.9.5, my problem is over.
I'm totaly new to ruby. I've tried to understand, but no luck.
I don't think i can help you.
Sorry.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Simon Coffey over 14 years ago
Thanks anyway, Jean-Baptiste. I suspect you're right, and something's wrong with apache/mongrel; the latter is refusing to give me any log output no matter what I do, which can't be a good sign.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Simon Coffey over 14 years ago
Fixed! I had trailing slashes on the ProxyPass lines of my httpd.conf file:
ProxyPass /redmine balancer://mongrelcluster/ ProxyPassReverse /redmine balancer://mongrelcluster/ ProxyPreserveHost on
should have read:
ProxyPass /redmine balancer://mongrelcluster ProxyPassReverse /redmine balancer://mongrelcluster ProxyPreserveHost on
D'oh.
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Gabriela Guarnerio about 14 years ago
Hello. I did every step and it all works fine, except, the themes. I got a plain white interfase, funtional, but it doesnt show any icons and I had a hard time getting to show the logo but it does. But not luck changing the theme. It really looks sad!
Using IE8, the debug shows:
url(/redmine/stylesheets/csshover.htc?1198861114)
Im totally new in Redmine. Any help will be appreciated!
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Jean-Baptiste Henry about 14 years ago
To Gabriela Guarnerio:
i think the solution is en the eight point of Install-Redmine
8. Assuming that we will be hosting Redmine under http://localhost/redmine
- Edit C:\webserver\Redmine\config\environment.rb file to configure Redmine to work as a sub-URI (Apache configuration is also required and is listed later on in this document).
- add the following line at the bottom of the file:
Redmine::Utils::relative_url_root = "/redmine"
- save and close the file
RE: HowTo Install Redmine in a sub-URI on Windows with Apache (Zero-to-Redmine) - Added by Gabriela Guarnerio about 14 years ago
The line was already added on the file (I did not miss any step on the installing). I attach a screenshot of how my Redmine looks like. As i said, it does work but I just cant see any themes, or any graphic icon, and really don´t know how to fix it.
redmine.png (27.8 KB) redmine.png | screenshot |