glassfish
  1. glassfish
  2. GLASSFISH-6767

Impossible to set environment for merb

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: V3
    • Component/s: jruby
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Macintosh

    • Issuezilla Id:
      6,767

      Description

      There does not appear to be a way to set the environment when running merb.
      MERB_ENV environment variable is not passed on, and -e environment has no effect.

        Activity

        Hide
        vivekp added a comment -

        Fixed. Patch submitted by Nick. Basically,:environment key is set to rails.env
        system property when starting Merb:

        diff --git a/grizzly/jruby/src/main/resources/jruby/rack/merb.rb
        b/grizzly/jruby/src/main/resources/jruby/rack/merb.rb
        index 0ac8270..3b58ea7 100644
        — a/grizzly/jruby/src/main/resources/jruby/rack/merb.rb
        +++ b/grizzly/jruby/src/main/resources/jruby/rack/merb.rb
        @@ -28,6 +28,7 @@ Merb.disable(:signals)

        1. Start merb
          Merb.start({
          + :environment => java.lang.System.getProperty("rails.env"),
          :merb_root => $glassfish_appRoot,
          :adapter => "grizzly",
          :log_level => log_level,

        The fix will go in to gem release 0.9.1.

        Show
        vivekp added a comment - Fixed. Patch submitted by Nick. Basically,:environment key is set to rails.env system property when starting Merb: diff --git a/grizzly/jruby/src/main/resources/jruby/rack/merb.rb b/grizzly/jruby/src/main/resources/jruby/rack/merb.rb index 0ac8270..3b58ea7 100644 — a/grizzly/jruby/src/main/resources/jruby/rack/merb.rb +++ b/grizzly/jruby/src/main/resources/jruby/rack/merb.rb @@ -28,6 +28,7 @@ Merb.disable(:signals) Start merb Merb.start({ + :environment => java.lang.System.getProperty("rails.env"), :merb_root => $glassfish_appRoot, :adapter => "grizzly", :log_level => log_level, The fix will go in to gem release 0.9.1.

          People

          • Assignee:
            vivekp
            Reporter:
            headius
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: