Skip to content

Error deploying on Openshift #266

Closed
Closed

Description

@duenni

Hi there,

I had a working stringer deployment on Openshift. Yesterday I pulled the latest updates and tried to push it to Openshift but I'm getting build errors:

git push
Enter passphrase for key 'xxx': 
Counting objects: 308, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (79/79), done.
Writing objects: 100% (246/246), 30.97 KiB | 0 bytes/s, done.
Total 246 (delta 164), reused 242 (delta 162)
remote: CLIENT_RESULT: Stopping CRON cart
remote: Stopping Ruby cart
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: waiting for server to shut down........ done
remote: server stopped
remote: Postgres stopped
remote: Saving away previously bundled RubyGems
remote: Running build on Ruby cart
remote: Restoring previously bundled RubyGems (note: you can commit .openshift/markers/force_clean_build at the root of your repo to force a clean bundle)
remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment'
remote: /var/lib/openshift/51xxxxxxxxxxxxxxx/app-root/runtime/repo/Gemfile:2:in `evaluate': undefined method `ruby' for #<Bundler::Dsl:0x00000002602d98> (NoMethodError)
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/dsl.rb:7:in `instance_eval'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/dsl.rb:7:in `evaluate'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/definition.rb:18:in `build'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler.rb:135:in `definition'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/cli.rb:220:in `install'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
remote:        /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/bin/bundle:13:in `<top (required)>'
remote:        /opt/rh/ruby193/root/usr/bin/bundle:23:in `load'
remote:        /opt/rh/ruby193/root/usr/bin/bundle:23:in `<main>'
remote: There was an error in your Gemfile, and Bundler cannot continue.
remote: An error occurred executing 'gear postreceive' (exit code: 4)
remote: Error message: Failed to execute: 'control build' for /var/lib/openshift/51xxxxxxxxxxxxxxx/ruby
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option.

Also the website shows a Passenger error page:

Ruby (Rack) application could not be started
These are the possible causes:

    There may be a syntax error in the application's code. Please check for such errors and fix them.
    A required library may not installed. Please install all libraries that this application requires.
    The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
    A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.

Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
    There was an error in your Gemfile, and Bundler cannot continue. (Bundler::GemfileError)
Exception class:
    PhusionPassenger::UnknownError
Application root:
    /var/lib/openshift/51xxxxxxxxxxxxxxx/app-root/runtime/repo 
Backtrace:
    #   File    Line    Location
    0   /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/dsl.rb   12  in `rescue in evaluate'
    1   /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/dsl.rb   6   in `evaluate'
    2   /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler/definition.rb    18  in `build'
    3   /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler.rb   135     in `definition'
    4   /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler.rb   123     in `load'
    5   /opt/rh/ruby193/root/usr/share/gems/gems/bundler-1.1.4/lib/bundler.rb   107     in `setup'
    6   /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/utils.rb    326     in `prepare_app_process'
    7   /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb     74  in `block (2 levels) in spawn_application'
    8   /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/utils.rb    563     in `report_app_init_status'
    9   /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb     73  in `block in spawn_application'
    10  /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/utils.rb    470     in `safe_fork'
    11  /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb     64  in `spawn_application'
    12  /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb    264     in `spawn_rack_application'
    13  /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb    137     in `spawn_application'
    14  /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb    275     in `handle_spawn_application'
    15  /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb  357     in `server_main_loop'
    16  /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb  206     in `start_synchronously'
    17  /opt/rh/ruby193/root/usr/share/gems/gems/passenger-3.0.21/helper-scripts/passenger-spawn-server     102     in `'

So I'm kind of lost here because I am not into Ruby. I followed this guide to install stringer: https://www.openshift.com/blogs/stringer-cause-google-reader-abandoned-your-feeds

It worked until I pulled the latest commit, but I didn't update the app for a few weeks so I can't figure out which commit brakes it...
Thanks in advance!

Activity

  1. Koronen commented on Aug 27, 2013

    @Koronen
    Contributor

    The issue seems to be that Openshift uses Bundler 1.1.4, but specifying a ruby version in Gemfile, like Stringer does, requires Bundler 1.2.0.pre or later (see https://github.com/bundler/bundler/blob/master/CHANGELOG.md#120pre-may-4-2012).

  2. duenni commented on Aug 27, 2013

    @duenni
    Author

    Ok thanks!
    Is there anything I can do about it if I can't update Bundler ?

  3. swanson commented on Aug 27, 2013

    @swanson
    Collaborator

    You can remove the ruby line from the Gemfile - I added it since it is recommended by Heroku.

  4. duenni commented on Aug 27, 2013

    @duenni
    Author

    Wohoo, thanks!
    It runs again. This can be closed, I'll ask on Openshift forum how to upgrade to a newer Bundler version.

  5. added a commit that references this issue on Jan 7, 2014
  6. added a commit that references this issue on Feb 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions