Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7091757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:13:39+00:00 2026-05-28T08:13:39+00:00

I have a simple Sinatra app that I will be hosting in tomcat as

  • 0

I have a simple Sinatra app that I will be hosting in tomcat as a war. Everything works fine when I warble it and run it in tomcat. If I set the Ruby 1.9 flag in my warble config

config.webxml.jruby.compat.version = “1.9”

then the war doesn’t run and I get this error in the tomcat logs

INFO: An exception happened during JRuby-Rack startup
no such file to load -- mysinatraapp
--- System
jruby 1.6.5.1 (ruby-1.9.2-p136) (2011-12-27 1bf37c2) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
Time: 2012-01-16 10:06:32 -0600
Server: Apache Tomcat/7.0.23
jruby.home: file:/apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.6.5.1.jar!/META-INF/jruby.home

--- Context Init Parameters:
jruby.compat.version = 1.9
jruby.max.runtimes = 1
jruby.min.runtimes = 1
public.root = /
rack.env = production

--- Backtrace
LoadError: no such file to load -- mysinatraapp
        require at org/jruby/RubyKernel.java:1047
        require at file:/apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.6.5.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
         (root) at /apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/config.ru:2
  instance_eval at org/jruby/RubyBasicObject.java:1720
     initialize at file:/apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/jruby-rack-1.1.3.jar!/vendor/rack-1.3.6/rack/builder.rb:51
         (root) at /apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/config.ru:1

the mysinatraapp.rb file is in the war so I don’t understand why it can’t find it. The app runs fine when just run from the command line in jruby so I don’t think it is a compatibility issue with my code and 1.9. Even just removing these lines from the web.xml

<context-param>
<param-name>jruby.compat.version</param-name>
<param-value>1.9</param-value>
</context-param>

will let the app startup fine.

The versions of my jars are
jruby-core-1.6.5.1.jar
jruby-rack-1.1.3.jar
jruby-stdlib-1.6.5.1.jar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:13:40+00:00Added an answer on May 28, 2026 at 8:13 am

    I think this can be explained by a subtle change in load path behavior between 1.8 and 1.9 (MRI too, not just JRuby). Witness:

    $ jruby -v -rpp -e 'pp $LOAD_PATH'
    jruby 1.7.0.dev (ruby-1.8.7-p357) (2012-01-12 0e83d96) (Java HotSpot(TM) Client VM 1.6.0_29) [darwin-i386-java]
    ["/Users/nicksieger/Projects/ruby/jruby/lib/ruby/site_ruby/1.8",
     "/Users/nicksieger/Projects/ruby/jruby/lib/ruby/shared",
     "/Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8",
     "."]
    
    $ jruby -v --1.9 -rpp -e 'pp $LOAD_PATH'
    jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-12 0e83d96) (Java HotSpot(TM) Client VM 1.6.0_29) [darwin-i386-java]
    ["/Users/nicksieger/Projects/ruby/jruby/lib/ruby/site_ruby/1.9",
     "/Users/nicksieger/Projects/ruby/jruby/lib/ruby/shared",
     "/Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.9"]
    

    So you’ll probably have to explicitly add '.' or $servlet_context.getRealPath("/WEB-INF") to the load path inside config.ru.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple Sinatra app that I am playing with, and for some
I'm using a very simple Sinatra app that works well. However, every log message
I have a simple Sinatra app that is configured using the modular style. When
I have a simple sinatra app that uses haml and sass for the views.
I have a very simple sinatra site that I'm trying to access via ajax
I have a very simple Sinatra app which only does log out the params
I have a simple config.ru file for my Sinatra app. require 'sinatra' require 'app'
I have built a pretty simple REST service in Sinatra, on Rack. It's backed
I have simple regex \.*\ for me its says select everything between and ,
I have simple win service, that executes few tasks periodically. How should I pass

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.