[SOLVED]Ruby on Rails won't run with apache/passenger

Hi I want to run Redmine, a Ruby on Rails application, on a personal server using MariaDB as the database and Apache with the Phusion Passenger module as the application platform. So far I am able to run Redmine with the default WeBrick server, but if I try to run it via Apache (http://192.168.1.5/redmine) I just get the directory index of  /usr/share/webapps/redmine. I've been running various php webapps using this apache installation without issues but my unfamiliarity with Ruby on Rails makes me unsure how to fix this. If I create a Ruby on Rails test  application as described at https://wiki.archlinux.org/index.php/Ru … figuration I get the same issue.
Using the arch wiki articles on Ruby on Rails and Redmine, This is basically how I installed things:
$ yaourt -S ruby1.9 rubygems1.9 nodejs redmine
# gem-1.9 install rails
# gem-1.9 install passenger
/opt/ruby-1-9/ and subfolders ended up having no read/exexute permissions for 'other', probably because of my umask settings, so I changed the permissions, also because apache runs as user/group 'apache'.
Ran the script that installs the passenger apache module:
# /opt/ruby1.9/bin/passenger-install-apache2-module
added to httpd.conf:
LoadModule passenger_module /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5/libout/apache2/mod_passenger.so
PassengerRoot /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5
PassengerDefaultRuby /opt/ruby1.9/bin/ruby
ServerName arch-server
DocumentRoot /usr/share/webapps
<Directory "/usr/share/webapps">
# This relaxes Apache security settings.
AllowOverride all
Order allow,deny
Allow from all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
I checked if the passenger module is loaded, and judging from /var/log/httpd/error_log that seems the case:
[ 2013-07-03 22:52:22.8947 28902/b7407700 agents/Watchdog/Main.cpp:440 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nobody', 'default_python' => 'python', 'default_ruby' => '/opt/ruby1.9/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_instances_per_app' => '0', 'max_pool_size' => '6', 'passenger_root' => '/opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_pid' => '28901', 'web_server_type' => 'apache', 'web_server_worker_gid' => '1001', 'web_server_worker_uid' => '1006' }
[ 2013-07-03 22:52:22.9120 28905/b73bd700 agents/HelperAgent/Main.cpp:555 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.28901/generation-0/request
[ 2013-07-03 22:52:22.9262 28902/b7407700 agents/Watchdog/Main.cpp:564 ]: All Phusion Passenger agents started!
[ 2013-07-03 22:52:22.9266 28910/b71dd700 agents/LoggingAgent/Main.cpp:271 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.28901/generation-0/logging
[Wed Jul 03 22:52:22 2013] [notice] Apache/2.2.24 (Unix) PHP/5.4.16 mod_ssl/2.2.24 OpenSSL/1.0.1e DAV/2 Phusion_Passenger/4.0.5 configured -- resuming normal operations
'apachectl configtest' gives 'Syntax OK'.
I followed the wiki on redmine (https://wiki.archlinux.org/index.php/Redmine), chose to use "bundle install" to install the required gems with only a 'production' environment. What worried me is that those gems are now in /root/.gems while the webserver runs as user 'apache'.
I can run Redmine at 192.168.1.5:3000 without errors using:
# ruby script/rails server webrick -e production
But if I kill it and try via apache http://192.168.1.5/redmine I get a directory content listing.
Last edited by rwd (2013-07-04 21:00:10)

Thanks markocz, my use of sub-url was indeed the problem. With help from the linked article I did the following:
# mkdir /usr/share/webapps/phusion-passenger/
# ln -s /usr/share/webapps/redmine/public /usr/share/webapps/phusion-passenger/redmine
# chown -R root:http /usr/share/webapps/
# chmod -R g+rx /usr/share/webapps/
httpd.conf now looks like this:
LoadModule passenger_module /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5/libout/apache2/mod_passenger.so
PassengerRoot /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/passenger-4.0.5
PassengerDefaultRuby /opt/ruby1.9/bin/ruby
ServerName arch-server
DocumentRoot /usr/share/webapps/phusion-passenger
<Directory "/usr/share/webapps/phusion-passenger">
# This relaxes Apache security settings.
AllowOverride all
Order allow,deny
Allow from all
# MultiViews must be turned off.
Options +FollowSymLinks
</Directory>
RailsBaseURI /redmine
<Directory "/usr/share/webapps/phusion-passenger/redmine">
Options -MultiViews
</Directory>
Redmine now works via passenger.
Last edited by rwd (2013-07-04 20:59:40)

Similar Messages

  • The latest Firefox won't run with Mac OS 10.4.11. How can I get the previous version of Firefox?

    I have Firefox 12.0. It won't run with Mac OS 10.4.11. I do not want to have to buy a new computer right now. I would like to go back to a previous version of Firefox that will run with my operating system. How can I download an older version of Firefox?

    You can find the latest Firefox 3.6.x release in all languages and for all Operating Systems here:
    *ftp://ftp.mozilla.org/pub/firefox/releases/latest-3.6/

  • MOVED: Won't run with 2 CPUs

    This topic has been moved to Server/workstation.
    Won't run with 2 CPUs

    Okay. Power supply info. Had to break my system down because the side that had the info on it was covered by the top of the tower.
    Enhance Electronics
    Model: ATX-1140F with Outlet
    400 Watt Power Supply
    +3.3v(28A), +5V(38A), +12V(18A), -12V(.8A), -5V(.5A), +5VSB(2A)
    The 4 pin connector is plugged in. =) I did not overlook that.
    As for trying it with fewer memory sticks, no I have not tried that but keep in mind that earlier today the previous mobo was in this machine and running with both CPUs and all 3 memory sticks (512, 512, 1024). All in the same memory slots as the original mobo. I pulled each one and inserted it in the new mobo before taking out the next one to be sure I put them back in the same slot.
    I checked and double checked all the bios settings and they match. The only thing that has changed since this morning is the replacement mobo and that is the exact same model as the one I replaced. System works fine with 1 CPU but not with 2. What might cause that on this motherboard but not the original one?

  • Please help, CS3 won't run with 10.5.2!  Please!

    Installed 10.5.2 on my g5 dual 2.5 w 4.5 gigs ram (NOT) intel. Now my AE projects won't run. One started to and then quit. This is major for me. Involves dozens of projects. Please help.

    Yes, my powerbook is also trouble-free.
    But it's just too slow to run AE on.
    And yes, yes, I did repair permissions. I did everything including a "safe" starup, repair permissions many many times, etc. etc. etc.
    I'm beginning to think the problem with AE was with non-ae plugins. But then why did automator and software update cease to work?????

  • How do I roll-back to the previous version of Firefox? An auto update occurred and now one of the programs used at the office (ACT! v6.0 SwiftMail) won't run with the browser.

    The office I work in uses a very old version of ACT!, an accounting package. This package has a component called SwiftPage, an antiquated email system that enables us to email from the ACT DB. SwiftPage runs via the web browser.
    Firefox just did an auto update (that I will have to find out how to turn off) and now SwiftPage won't run as it is not compatible.
    Can I "roll-back" my version of Firefox or do I have to uninstall and try to re-install an older version?
    HELP!

    Try loading and using the add-on from this link: https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
    Many add-ons do in fact work if you force them to run. The procedure to roll-back is given in this article: [[installing previous versions of firefox]]
    Unfortunately the official Firefox policy is that you downgrade to 3.6 which is supported for a while longer, and not the now unsupported Firefox 4. If after installing and running the ''add-on compatibility reporter'' you still have problems there are ways around the official policy.
    I think it is absurd that Firefox 4 may be used by tens of millions of users one day and a few days later those that upgrade to Firefox 5 should be not only told not to use a now unsupported browser, if they need to revert due to problems, but are actually obstructed in attempts to do so. See also [/questions/840397#answer-205154]

  • I downloaded the new firefox and now I get an error stating it won't run with my version of Mac OS? What is the fix?

    I was prompted to upgrade to Firefox 4 - I have a 3.6 version. When I move it to my application folder and tried to run it, I get the error that it cannot run with my version of Mac OS. I'm not sure how to update my OS version or go back to an older version of Firefox.

    Firefox 4 requires at least OS X 10.5. You can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
    Mozilla are working to prevent Mac users with non-compatible systems from getting the notification about Firefox 4, and also not displaying the "Download Firefox 4" button on http://www.mozilla.com

  • Won't run with 2 CPUs

    I just replaced my 6501 motherboard with one that MSI sent me. When I install both processors the computer most times hangs at startup screen. Lights 2 and 3 are red which indicates it stops at the Bios sign-on.
    It hangs where it says AMD MP 2800 Processor but before memory test and it does not display the , (2 cpu's) to the far right of the processor (80% of the time this happens on boot-up). Occasionally when I reboot it will detect both CPUs and will initialize the bios and then start loading windows at which point it immediately reboots.
     If I remove the second CPU and reboot the machine boots fine and I can load up windows.
    I have swapped both CPUs and put both of them in the Primary CPU slot and they both boot up and run fine no issues. Only when I try to have both in do I have problems. The reason I replaced the MB was because of some dried out capacitors. I got the 1.91 bios update already. Not sure what might be causing this but I want both CPUs working like before. Any help would be appreciated.
    This is the first time this board has been used. I pulled it out of the box this morning. It is a refurbished board from MSI. The other board with the dried out capacitors ran both CPUs fine without issue but I had data transfer issues so had to replace it. The newest bios available for this motherboard appears to be award bios v1.91 which is the one I have.
    If any further info is needed let me know what else you need. (I am on the computer having troubles right now but with only 1 CPU running - works fine albeit a bit slower)

    Okay. Power supply info. Had to break my system down because the side that had the info on it was covered by the top of the tower.
    Enhance Electronics
    Model: ATX-1140F with Outlet
    400 Watt Power Supply
    +3.3v(28A), +5V(38A), +12V(18A), -12V(.8A), -5V(.5A), +5VSB(2A)
    The 4 pin connector is plugged in. =) I did not overlook that.
    As for trying it with fewer memory sticks, no I have not tried that but keep in mind that earlier today the previous mobo was in this machine and running with both CPUs and all 3 memory sticks (512, 512, 1024). All in the same memory slots as the original mobo. I pulled each one and inserted it in the new mobo before taking out the next one to be sure I put them back in the same slot.
    I checked and double checked all the bios settings and they match. The only thing that has changed since this morning is the replacement mobo and that is the exact same model as the one I replaced. System works fine with 1 CPU but not with 2. What might cause that on this motherboard but not the original one?

  • Vids won't run with Safari, but work with FireFox just fine

    I can't get vids to run with Safari. Where the vid is supposed to be, on YouTube etc, it's just blank. They run fine with FireFox, though. I don't mind using FireFox, its a great browser. I just don't like the idea of something being wrong with my MacBook.

    Make sure your plug-ins are enabled in Safari (preferences) and that you're not using Rosetta mode (Get Info window).
    http://www.adobe.com/shockwave/download/alternates/
    Uninstall Flash and reinstall the software.

  • WinProducer2 start error, won't run with nVidia Capture drivers

    I'm not having a good experience with the bundled WinProducer2 that came with my MX440VT8x-128.
    If I have either of the versions of the nVidia capture-drivers that came on the card's CD (that's v. 1.16 or 1.18)  installed, or the 1.22 version from nVidia's website (as of 2-20-03),  and then try to start WinProducer, I get the same start-error every time:
    "WinProducer.exe has generated errors and will be closed by Windows....need to restart program...an error log is being generated."
    If I look at the Dr. Watson log, it says WinProducer 2 generated  "Exception Violation c00005."
    If I uninstall the nVidia capture-drivers, WinProducer2 opens right up just fine, but, of course, with no capture capability.
    I downloaded and tried (after uninstalling v.2) WinProducer3 from InterVideo's website yesterday (2/20/03), with the exact same results!   ???
    Anybody else having this problem?
    This is under Win2k, w/SP2,  then added SP3, with no improvement.
    Stenn

    After I made the original post, I tried a lot more things that didn't help:
    I booted in safe mode and tried it but PSP gave an error message that it wouldn't run with the screen resolution that low (800x600); so it did try to run. So I booted normally and set the screen rez to 800x600 manually, then tried to run PSP and got the same error message.
    I did a clean boot with all start-up programs and all services disabled; PSP still wouldn't run.
    I disabled my anti-virus and PSP still wouldn't run.
    Disabled my video card in the device manager and booted with my on-board video; PSP still wouldn't run.
    There's never an error message as long as the screen rez is high enough; when I try to run it, it looks like it's starting to run but nothing ever happens.

  • BC4J Tester won't run with SunJCE provider enabled in JDev 903

    I have a working BC4J project that I can access via the Tester and via code in JDev 903. The Module is deployed in 'Local' mode.
    I go into <jdev_home>\jdk\jre\lib\security\java.security and add the following line:
    security.provider.3=com.sun.crypto.provider.SunJCE
    I can no longer run the BC4J Tester - I get "java.lang.NullPointerException" - that's it - in the log window when I try to run the tester. I can still access the BC4J Module via code, just as before enabling the SunJCE provider, its just the Tester that won't run. My code that uses the SunJCE provider runs fine.
    I then comment out the new line in java.security, and the Tester runs fine again. (But, of course, my code that needs the SunJCE provider does not...)
    Note that I added this provider as the lowest order provider - the following is how java.security is setup when JDev is installed:
    security.provider.1=sun.security.provider.Sun
    security.provider.2=com.sun.rsajca.Provider
    Any thoughts or ideas?
    Thanks,
    Jim Stoll
    (I need this provider for something else I'm doing which uses both the SunJCE provider and BC4J, independent of each other)

    Hi,
    Can you create a JClient project to test your application module? I have not found why it failed in Tester when using SunJCE privider, but found that if I create a simple JClient using the same application module, it work.
    Thanks,
    Yvonne

  • The Missing Sync for Palm OS v6.0.4 won't run with my Palm Tungsten E2

    Having problems with Palm iSync on My iBook with 10.4.11 I bought The Missing Sync.
    I removed Palm Desktop and installed Missing Sync. However sync won't start when I press the HotSync button.
    Is my Palm Tungsten E2, running Palm OS Garnet v. 3.1.1 too old? 
    If so, can I upgrade it? 
    Post relates to: Tungsten E2
    Post relates to: Tungsten E2

    No, there is nothing published - that I am aware of - other than the Missing Sync User Guide that you received [as portable document format file] when you purchased the Missing Sync for Palm OS.
    There is some developer documentation available from Apple, but it has little direct bearing on anything like the issue you are seeing. Your crash logs should have provided an indication of what was going on, and - using them - Mark/Space should have been able to identify your issue pretty easily.
    It's very difficult to troubleshoot unusual issues remotely. Common problems - which can be easily identified - are readily corrected just by following the instructions posted by some knowledgable person here in the Apple Discussions forums. Given the unique circumstances you report of total failure following the installation of the Missing Sync, it's very likely that the actual culprit in your configuration is NOT the Palm desktop, iSync, .Mac Sync, the Missing Sync for Palm OS or your Treo 600. Something unique about your configuration is likely responsible. Trying to eliminate the variables, though, is not an easy task.
    One relatively easy way to troubleshoot such issues is to create a new user, reinstall the Missing Sync and attempt to synchronize using that new user account. If that process is successful, you'll immediately know that something involving your existing user account is responsible for the issue.

  • Azure Compute Emulator won't run with SDK 1.5

    I just upgraded to SDK 1.5, and the Compute emulator won't start.  When I click start in the try icon, it starts, and immediately shuts down again.  When I try a deployment from either of my apps, they just hang and eventually time out (unable
    to connect to dfservice!).
    As it happens I did the SDK1.5 install, and had this problem, then my machine died.  I did a complete clean rebuild from the ground up, and am still having the same problem.  I've uninstalled and re-installed SDK 1.5 several times.
    On my 2nd to last install, I saw this in the event log:
    Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
    DETAIL -
    8 user registry handles leaked from \Registry\User\S-1-5-21-1220752895-2385599502-2399097210-1001:
    Process 932 (\Device\HarddiskVolume5\Windows\System32\lsass.exe) has opened key \REGISTRY\USER\S-1-5-21-1220752895-2385599502-2399097210-1001
    Process 932 (\Device\HarddiskVolume5\Windows\System32\lsass.exe) has opened key \REGISTRY\USER\S-1-5-21-1220752895-2385599502-2399097210-1001
    But I didn't get that on the most recent install (This last time, I didn't use the platform installer).
    Any help is GREATLY appreciated.  I can't afford to do another clean rebuild.
    Thanks,
    Mark

    I got the below error if I leave Emulator running in one account and switch to another account and trying to start deployment against it.
    The compute emulator had a error: Access is denied..
    Error details:
    Server stack trace:
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Windows.Azure.DevFabric.IManagement.CreateTenant(String tenantName)
       at Microsoft.ServiceHosting.Tools.DevelopmentFabric.FabricClient.AddServiceDeployment(String tenantName, String serviceModelPath, String instanceDescriptionPath, ServiceDeploymentOptions options)
    I wonder if it's the same error you got. If it's the case, re-install the SDK solve the problem for me.

  • Iphoto 9.6 won't run with Yosemite 10.10.1

    I'm running a mid 2011 Macbook Pro with Yosemite 10.10.1 and iPhoto 9.6.  After upgrading OS to 10.10.1 yesterday, iPhoto won't completely load.  The software opens but the "death spiral" icon just keeps spinning, and my photo library won't load.  Any suggestions to fix it?

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • Javac won't run with XP

    I recently purchased a new laptop that has Windows XP. If I compile a "hello world" class on another machine and copy it over to the XP box, I can run it. However, I can not run javac on the XP box to compile the same file. Any Ideas why?
    Thank you

    Hey How's it going,
    I do not have a direct answer for U, but I can tell U that yes software can fail because of the motherboard configuration. Chipsets and memory differences are famous for causing unexplained anomolies.
    Even differences in the bussing architecture on mainboard can create anomolies., especially in the area of system memory bussing to and from system memory.
    The big kicker that U mentioned is that it only fails on your laptop. Laptops are famous for creating low voltages. And every system starts with the power supply. All the magic that U see on your computer screen is created by electrical impulses. What I mean is that all of the 1's and 0's get produced and passed as data through memory and the CPU by electrical impulses and laptops often create odd or low voltage issues. Which can manifest in many ways.
    **Areas to look at are: Chipset instruction, check security settings & registry permissions as well as the usual java settings in your advanced options.
    Also, right now depending if your OS (XP) has service pack 1 or SP1a . Service pack 1a removes the microsoft VM version of java and there are issues with the java sun version properly running script in windows. There is a corp. battle right now and Microsoft lost the last battle in court.
    However, if U haven't added the java patch into your XP try that because it works for somethings.
    I realize that not all of these suggestions may apply to your exact situation, but I just wanted to throw what I do know out there for ya and I hope somethings I may have said will help U!
    Lastly, beyond looking at some of these areas that I have just suggested and U may discover some others, but these are what I can think of off the top of my head. You are looking at "YES" hardware.
    Believe it or not!
    Just so U know where this is coming from: I am a technical agent for a certain computer company and I deal with these issues everyday. Ppl look to me to solve these issues and I can defineatly tell U "it all starts with the hardware." You just have to remember that software is written to run on the hardware not the other way around, atleast in the standard end user PC environment and right now the hardware is out pacing the software in developement. That alone opens up all kinds of compatibility issues.
    Anyway, I hope I have understood your question properly and I have said something that helps!
    Dardenn
    [email protected]

  • Youtube won't run with firefox or Facebook

    When wanting to run video from youtube on both firefox and facebook from my Android phone I get a message telling me I need an account with youtube and a channel. I have an account with youtube and it won't let me sign in when attempting to.
    Have tried using Google browser on phone and am able to run youtube content and video with no problem.
    Any ideas???

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    The Firefox cache temporarily stores images, scripts, and other parts of websites while you are browsing. <br>
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies, do the following:
    #Tap the menu icon located at the top right corner. This is the icon with 3 bars. On older Android devices you'll have to press the hardware menu key and then tap More.
    #Tap '''Settings'''.
    #After that, you will be taken to the settings screen. In the settings screen, look under the section '''''Privacy & Security''''' and select '''Clear private data'''.
    #You will then be taken to a list of what can be cleared. Select the following 2 for deletion:
    #*Cookies & active logins
    #*Cache
    #After those have been selected, tap the '''Clear data''' button to actually clear the cache and cookies.
    Did this help you with your problems? Please let us know!

Maybe you are looking for

  • Making an iWeb site for dialup users

    I'd like tips on using iWeb 08 to make a site (to be part of my mac.com space) that will be suitable for people with dialup connexions to use. This is for a Friends of the Library organization for a rural branch library, and most of our area has no a

  • Issue of under absorption  and over absorption

    Dear All, Audit is going on in our client and auditor found that there is  and over absorption  of cost in cost center, which mean we are valuating our product at higher price and thus showing less profit in system. They are referring the cost center

  • I cant make the Subscriptions

    Hi, Would you please check my account joesong668. I cant make the payment through paypal. Each time I paid, skype will reject the payment and refund me. Please let me how to solve this problem. Joe Solved! Go to Solution.

  • Can 8i be a Web Service Consumer?

    Is it possible to call a web service from a PL/SQL block in 8i (8.1.7) database? And do have any examples or guidelines? Thanks, Frederik

  • Rendering Intent

    Lately, I've come to the conclusion that the proper rendering intent for printing is Absolute, with the caveat that there is no out of gamut colors with which to accommodate. The text in the selection menu for this function states that Absolute is be