1

I am trying to get a Rails application to run using jRuby and IIS as a production web server. After a few weeks of trying, I followed this tutorial using HttpPlatformHandler and IIS 8. The Rails app is now running however the application.css and application.js files are not compiling and are empty leaving the website completely unstyled and with no javascript.

Has anyone any idea why this might be and how to fix it?

Rails version is 4.2.2

application.css:

*= require jquery.dataTables
*= require dataTables.responsive
*= require dataTables.bootstrap
*= require dataTables.tableTools
*= require jquery-ui
*= require_tree .
*= require_self    

application.js:

//= require jquery
//= require jquery_ujs
//= require jquery-ui 
//= require jquery.dataTables
//= require dataTables.responsive
//= require dataTables.tableTools
//= require dataTables.bootstrap
//= require turbolinks
//= require bootstrap-sprockets

Gemfile is as follows:

source 'https://rubygems.org'

ruby '2.2.2', :engine => 'jruby', :engine_version => '9.0.0.0'

gem 'rails',                '4.2.2'
gem 'bootstrap-sass',       '3.2.0.0'
gem 'sass-rails',           '5.0.2'
gem 'uglifier',             '2.5.3'
gem 'coffee-rails',         '4.1.0'
gem 'coffee-script-source', '1.8.0'
gem 'jquery-rails',         '4.0.3'
gem 'turbolinks',           '2.3.0'
gem 'jbuilder',             '2.2.3'
gem 'faker',                '1.4.2'
gem 'tzinfo-data'
gem 'sdoc',                 '0.4.0', group: :doc

group :development, :test do
  gem 'activerecord-jdbcsqlite3-adapter',     '1.3.17'
  gem 'spring',      '1.1.3'
end

group :test do
  gem 'minitest-reporters', '1.0.5'
  gem 'mini_backtrace',     '0.1.3'
  gem 'guard-minitest',     '2.3.1'
end

Web.Config file as follows:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <handlers>
        <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
    </handlers>
    <httpPlatform stdoutLogEnabled="true" processesPerApplication="1" stdoutLogFile="rails.log" startupTimeLimit="20" processPath="C:\jruby-9.0.0.0\bin\jruby.exe"
              arguments="-S trinidad --context /rails --env production --dir C:\inetpub\wwwroot\rails -p %HTTP_PLATFORM_PORT% ">
        <environmentVariables>
          <environmentVariable name="JAVA_HOME" value="C:\Program Files\Java\jre7"/> 
        </environmentVariables>            
    </httpPlatform>
</system.webServer>
</configuration>
Lex Li
  • 60,503
  • 9
  • 116
  • 147
TheFlanman91
  • 141
  • 1
  • 2
  • 11

0 Answers0