Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.0.2, JRuby 1.1b1
    • Fix Version/s: JRuby 1.0.3, JRuby 1.1RC1
    • Component/s: OpenSSL
    • Labels:
      None
    • Environment:
      WINDOZE (W2k; Java 5 (1.5.0_06)) Fresh checkout with both JRuby branch and JRuby trunk
    • Number of attachments :
      0

      Description

      I just tried out Rails 2.0.1. Perhaps this is a non-issue and has been fixed in a non-released version of openssl, but I thought I would report it in case it slipped through the cracks.

      ./bin/jruby -S rails heh
      uninitialized constant Digest::SHA2
      [Fuebo /opt/workspace/jruby_trunk]$ ./bin/jruby -S gem install jruby-openssl -y --no-ri --no-rdoc
      Successfully installed jruby-openssl-0.0.4
      [Fuebo /opt/workspace/jruby_trunk]$ ./bin/jruby -S rails heh
      private method `rand' called for OpenSSL::BN:Class
      

        Activity

        Hide
        William Gannon added a comment -

        I thought I would try jruby-openssl-0.0.5 from SVN (http://jruby-extras.rubyforge.org/svn/trunk/jopenssl/).

        First, I copied the build.properties.SAMPLE to build.properties and made it contain:

        C:\jopenssl>cat build.properties
        version.target=1.5
        version.source=1.5
        jruby.home=c:/jruby/head
        jruby.jar=$

        {jruby.home}

        /lib/jruby.jar

        1. set this to an alternate location to compile against a different jruby.jar
        2. jruby.jar=lib/jruby.jar

        Next, I ran ant and compiled.

        Next, I ran jruby on jruby-openssl.gemspec and successfully created a new gem

        Next, did jruby -S gem install jruby-openssl -v 0.0.5 and successfully installed the gem

        However, when running jruby -S rails railsapp1, I get the following message:

        uninitialized constant Digest::SHA2

        So I looked in rails-2.0.1\lib\rails_generator\secret_key_generator.rb again and see the it requires 'openssl', but 'openssl' requires 'jopenssl' which does not exist in the jrbuy lib...shouldn't this have been installed with the gem package?

        I thought I compiled the jruby-openssl correctly but apparently I have not.

        Show
        William Gannon added a comment - I thought I would try jruby-openssl-0.0.5 from SVN ( http://jruby-extras.rubyforge.org/svn/trunk/jopenssl/ ). First, I copied the build.properties.SAMPLE to build.properties and made it contain: C:\jopenssl>cat build.properties version.target=1.5 version.source=1.5 jruby.home=c:/jruby/head jruby.jar=$ {jruby.home} /lib/jruby.jar set this to an alternate location to compile against a different jruby.jar jruby.jar=lib/jruby.jar Next, I ran ant and compiled. Next, I ran jruby on jruby-openssl.gemspec and successfully created a new gem Next, did jruby -S gem install jruby-openssl -v 0.0.5 and successfully installed the gem However, when running jruby -S rails railsapp1, I get the following message: uninitialized constant Digest::SHA2 So I looked in rails-2.0.1\lib\rails_generator\secret_key_generator.rb again and see the it requires 'openssl', but 'openssl' requires 'jopenssl' which does not exist in the jrbuy lib...shouldn't this have been installed with the gem package? I thought I compiled the jruby-openssl correctly but apparently I have not.
        Hide
        William Gannon added a comment -

        Doh...maybe I should read my docs more!!!

        Ran gem build jruby-openssl.gemspec and got the correct gem file.

        Show
        William Gannon added a comment - Doh...maybe I should read my docs more!!! Ran gem build jruby-openssl.gemspec and got the correct gem file.
        Hide
        Nick Sieger added a comment - - edited

        I believe this is fixed now, and should work even without the openssl gem installed. Stub versions of OpenSSL::Digest and HMAC are built-in, as is 1.9's SecureRandom class which should take precedence in the secret_key_generator.

        Show
        Nick Sieger added a comment - - edited I believe this is fixed now, and should work even without the openssl gem installed. Stub versions of OpenSSL::Digest and HMAC are built-in, as is 1.9's SecureRandom class which should take precedence in the secret_key_generator.
        Hide
        Alberto Luiz Souza added a comment -

        Hi, i'm trying to get started with JRuby reading the JRuby on Rails..., i installed the last version of JRuby, get the latest Ruby version etc... I followed your tips to run rails command to create an application but the error remains. There is a step by step to make run this command with those versions of Ruby and JRuby?

        Show
        Alberto Luiz Souza added a comment - Hi, i'm trying to get started with JRuby reading the JRuby on Rails..., i installed the last version of JRuby, get the latest Ruby version etc... I followed your tips to run rails command to create an application but the error remains. There is a step by step to make run this command with those versions of Ruby and JRuby?
        Show
        Vladimir Sizikov added a comment - Please try these resources for simple step-by-step instructions: http://wiki.jruby.org/wiki/Running_Rails_with_ActiveRecord-JDBC http://blog.emptyway.com/2008/04/08/120-seconds-guide-to-jruby-on-rails |

          People

          • Assignee:
            Unassigned
            Reporter:
            Thomas E Enebo
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: