#13 ✓resolved
btm

Building webroar with MacPorts Ruby

Reported by btm | January 19th, 2010 @ 03:58 PM

I try webroar install with MacPorts Ruby, so I found two problem.

  1. Webroar build with Mac OS's Ruby, not MacPorts Ruby.
  2. Can't compile with SSL support using MacPorts gnutls.

I create patch for webroar 0.2.6(see attachment). It's not for github's HEAD.

My solution is adding 'MacPorts support option'. If my way is fine, I rewrite patch for github's HEAD. Please check my patch.

Comments and changes to this ticket

  • Nikunj Limbaseeya

    Nikunj Limbaseeya January 27th, 2010 @ 10:02 PM

    • State changed from “new” to “open”
    • Assigned user set to “Nikunj Limbaseeya”
  • Nikunj Limbaseeya

    Nikunj Limbaseeya January 27th, 2010 @ 10:16 PM

    Thank you for trying out WebROaR.

    We tried running WebROaR with MacPorts Ruby and did not face any issues. Here are the steps followed by us on Mac OS X 10.5.7:

    1. Download latest MacPorts source code from http://distfiles.macports.org/MacPorts/MacPorts-1.8.2.tar.gz

    2. Extract the tar file

      $tar -xvvf MacPorts-1.8.2.tar.gz
      
    3. Install MacPorts

      $cd MacPorts-1.8.2/
      $./configure
      $make && sudo make install
      
      Check out the 'PATH' environment variable
      $echo $PATH
      /opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin
      
      By default Macports gets installed at '/opt/local'. '/opt/local/bin' and '/opt/local/sbin' should be before '/usr/bin' and '/usr/sbin' in the PATH to use MacPorts Ruby over Apple's. It needs to be done manually for older MacPorts versions (prior to 1.6.0).
    4. Update MacPorts (Optional) $sudo port -d selfupdate

      Edit $prefix/etc/macports/sources.conf, comment out the rsync entry, and add a new entry as follows:

      #rsync://rsync.macports.org/release/ports/ [default]
      http://www.macports.org/files/ports.tar.gz [default]
      
      $sudo port -d sync
      
    5. Install Ruby 1.8.7 and RubyGems 1.3.4

      $sudo port install ruby
      $sudo port install rb-rubygems
      
    6. Install WebROaR and Rack gems

      $sudo gem install rack -v 1.0.1
      $sudo gem install webroar
      
    7. Install WebRoaR on machine

      $sudo webroar install
      

    The server worked perfectly fine after following the above steps. Could you please try these and let us know in case you face any issues?

    We also tried compiling it with Gnutls 2.8.5 available on Macports and that also worked fine. Please do let us know how it goes for you.

    Nikunj

  • btm

    btm January 28th, 2010 @ 08:01 AM

    I try MacOSX 10.5(My report is 10.6) and get same error.
    Don't use my patch, otool return this result.

    $ otool -L /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/bin/webroar-worker 
    /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/bin/webroar-worker:

    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.6)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)</code>
    
    
    
    
    This result mean using system's ruby, not "/opt/local/lib/libruby.dylib", so use system's gems.
    $ cat /var/log/webroar/Admin Panel.log
    WebROaR-0.2.6: Log file opened at Thu Jan 28 10:56:41 2010
    Thu Jan 28 10:56:41 2010-30310-Info:setting log level to SEVERE
    Thu Jan 28 10:56:41 2010-30310-Info:Ruby interpreter initialized successfully
    Thu Jan 28 10:56:44 2010-30310-Error:LoadError-no such file to load -- rack
    /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require'
    /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire'
    /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/ruby_interface/defl
    ater.rb:20
    /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/ruby_interface/ruby
    _interface.rb:26:in require'
    /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/ruby_interface/ruby
    _interface.rb:26
    /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/webroar_app_loader.
    rb:19:inrequire'
    /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/webroar_app_loader.
    rb:19
    Thu Jan 28 10:56:44 2010-30310-Error:Some problem occurred while loading applica
    tion.
    Thu Jan 28 10:56:44 2010-30310-Error:unable to load application.
    Thu Jan 28 10:56:44 2010-30310-Info:Worker stopped and exiting gracefully.
    
    May be you install system's gem. I don't install rack to system's gem, only macports gem.
    Also I install macports gnutls at 10.5, I can't compile webroar with this message.
    /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/vendor/libebb/ebb.h:32:28: error: gnutls/gnutls.h: No such file or directory
    
    May be you install gnutls to /usr or /usr/local. Please check webroar-head with "otool -L".
  • donncha

    donncha January 29th, 2010 @ 08:42 AM

    Exactly the same problem here:

    bash-3.2$ sudo gem uninstall actionmailer actionpack activerecord activeresource activesupport
    ... All versions

    bash-3.2$ gem sources -a http://gems.github.com
    http://gems.github.com added to sources
    bash-3.2$ sudo gem install webroar
    ERROR: Error installing webroar:

    actionpack requires rack (~> 1.0.0, runtime)
    

    bash-3.2$ sudo gem install rack -v 1.0.1
    Successfully installed rack-1.0.1
    1 gem installed
    Installing ri documentation for rack-1.0.1...
    Installing RDoc documentation for rack-1.0.1...
    bash-3.2$ sudo gem install webroar
    Successfully installed actionpack-2.3.5
    Successfully installed actionmailer-2.3.5
    Successfully installed activeresource-2.3.5
    Successfully installed rails-2.3.5
    Successfully installed webroar-0.2.6
    5 gems installed
    Installing ri documentation for actionpack-2.3.5...
    Installing ri documentation for actionmailer-2.3.5...
    Installing ri documentation for activeresource-2.3.5...
    Installing ri documentation for rails-2.3.5...
    Installing ri documentation for webroar-0.2.6...
    Installing RDoc documentation for actionpack-2.3.5...
    Installing RDoc documentation for actionmailer-2.3.5...
    Installing RDoc documentation for activeresource-2.3.5...
    Installing RDoc documentation for rails-2.3.5...
    Installing RDoc documentation for webroar-0.2.6...
    bash-3.2$ sudo webroar install
    Checking for the dependencies ...
    Checking for ruby........found at /opt/local/bin/ruby.
    Checking for libruby.1.8.7.dylib........found at /opt/local/lib.
    Checking for openssl-ruby........found.
    Checking for zlib-ruby........found.
    Checking for ruby_headers........found at /opt/local/lib/ruby/1.8/i686-darwin10/ruby.h.
    Checking for rubygems........found.
    Checking for /usr/bin/gcc-4.2........found at /usr/bin/gcc-4.2.
    Checking for make........found at /usr/bin/make.
    Checking for starling........found at /opt/local/bin/starling.
    Checking for Xcode.app........found at /Developer/Applications/Xcode.app.
    Checking for any previous installation of WebROaR ... not found.
    Setting up server admin panel ...
    Please enter a username for the administrator account of server's admin panel: admin
    Please enter a password(minimum 6 characters) for the administrator account of server's admin panel:
    Confirm password:
    Setting up server specifications ...
    Enter server port (default is 3000):
    Creating directory structure ... done.
    Compiling C source files ... done.
    Installing server ...
    Setting up server admin panel application database ... done.
    WebROaR installed successfully.
    Stopping webroar-head ... done.
    Stopping webroar-analyzer process ... done.
    Starting WebROaR ...
    Initiating WebROaR startup sequence ...
    Starting message queue server ... done.
    Starting webroar-head process ...
    No applications currently deployed on the server.
    Head process started successfully.
    Starting webroar-analyzer process ... done.
    Server started successfully.

    Deploy a ruby web application using server admin panel, accessible through the link - http://localhost:3000/admin-panel

    bash-3.2$ which ruby
    /opt/local/bin/ruby bash-3.2$ ruby -v
    ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]
    bash-3.2$ gem list
    actionmailer (2.3.5)
    actionpack (2.3.5)
    activerecord (2.3.5)
    activeresource (2.3.5)
    activesupport (2.3.5)
    ... rack (1.0.1)
    rails (2.3.5)
    ... starling-starling (0.10.0)
    ... webroar (0.2.6)

    LOG:
    WebROaR-0.2.6: Log file opened at Fri Jan 29 14:11:40 2010
    Fri Jan 29 14:11:40 2010-25888-Info:setting log level to SEVERE
    Fri Jan 29 14:11:40 2010-25888-Info:Ruby interpreter initialized successfully
    Fri Jan 29 14:11:40 2010-25888-Error:LoadError-no such file to load -- rack
    /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire' /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/ruby_interface/deflater.rb:20 /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/ruby_interface/ruby_interface.rb:26:in require' /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/ruby_interface/ruby_interface.rb:26 /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/webroar_app_loader.rb:19:inrequire' /opt/local/lib/ruby/gems/1.8/gems/webroar-0.2.6/src/ruby_lib/webroar_app_loader.rb:19 Fri Jan 29 14:11:40 2010-25888-Error:Some problem occurred while loading application.
    Fri Jan 29 14:11:40 2010-25888-Error:unable to load application.
    Fri Jan 29 14:11:40 2010-25888-Info:Worker stopped and exiting gracefully.

  • Nikunj Limbaseeya

    Nikunj Limbaseeya January 29th, 2010 @ 09:51 PM

    • State changed from “open” to “resolved”

    @btm,

    Thank you for suggesting using otool. It helped exposing the exact problem to us. My apologies for not looking in to it that deeply yesterday, i just checked the WebROaR install.log file and the include headers were of the MacPorts ruby. I just assumed it would be linking to it as well. My bad.

    We have fixed this issue by passing in the correct lib paths during linking. Also, we have fixed the include paths and now WebROaR builds with MacPorts guntls. (We are also contemplating allowing additional include and lib paths to be passed during WebROaR installation to handle dependent software being installed at custom locations.)

    Could you please try out the latest code from github and let us know how it goes for you? Thanks again for all your efforts.

    @donncha,

    Thank you for your comment. The fix made above would also resolve the issue seen by you. WebROaR would now load MacPorts gems.

    Could you also please try out the latest code from github and let us know how it goes for your application?

    Nikunj

  • donncha

    donncha February 1st, 2010 @ 04:26 AM

    OK, solution works for me. Application is up and running now. Thanks.

  • btm

    btm February 1st, 2010 @ 07:14 AM

    OK, this solution works for me too. All application is running, and SSL support works fine.
    Thanks!

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

<strong>Source Code Location</strong>
Repository is at <a href="http://github.com/webroar/webroar" target="_blank">http://github.com/webroar/webroar</a>
<p>
Check out the development master:
git clone git://github.com/webroar/webroar.git

<p>
<strong>Creating a bug report</strong>

When creating a bug report, be sure to include as much relevant information as possible.
<p>
Security vulnerabilities should be reported via an email to security@webroar.in, do not use lighthouse for reporting security vulnerabilities. All content in lighthouse is publicly available as soon as it is posted.

Shared Ticket Bins

Attachments

Pages