Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5 support #3

Open
justusjonas74 opened this issue Jul 10, 2017 · 3 comments
Open

Rails 5 support #3

justusjonas74 opened this issue Jul 10, 2017 · 3 comments
Assignees

Comments

@justusjonas74
Copy link

Using latest version of the gem produces error during install.

$ bundle install
 ##Resolving dependencies...
Bundler could not find compatible versions for gem "rails":
  In snapshot (Gemfile.lock):
    rails (= 5.1.2)

  In Gemfile:
    rails (~> 5.1.2)

    gtfs_engine was resolved to 1.2.0, which depends on
      rails (~> 4.1)
@sangster
Copy link
Owner

Hi @justusjonas74, thanks for checking out my rubygem. Could you try the new v1.5.3 and see if it works for you in Rails 5?

Thanks!

@sangster sangster self-assigned this Jul 15, 2017
@justusjonas74
Copy link
Author

Thanks for your quick response. The bundle install command now works. Unfortunately the app doesn't start after installing the engine.

$ rails s 
/usr/local/rvm/gems/ruby-2.3.4/gems/railties-5.1.2/lib/rails/commands/server/server_command.rb:129:in `block in perform': uninitialized constant Rails::Command::ServerCommand::APP_PATH (NameError)
       from /usr/local/rvm/gems/ruby-2.3.4/gems/railties-5.1.2/lib/rails/commands/server/server_command.rb:126:in `tap'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/railties-5.1.2/lib/rails/commands/server/server_command.rb:126:in `perform'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/railties-5.1.2/lib/rails/command/base.rb:63:in `perform'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/railties-5.1.2/lib/rails/command.rb:44:in `invoke'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/railties-5.1.2/lib/rails/commands.rb:16:in `<top (required)>'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/railties-5.1.2/lib/rails/engine/commands.rb:7:in `require'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/railties-5.1.2/lib/rails/engine/commands.rb:7:in `<top (required)>'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/gtfs_engine-1.5.3/bin/rails:8:in `require'
       from /usr/local/rvm/gems/ruby-2.3.4/gems/gtfs_engine-1.5.3/bin/rails:8:in `<top (required)>'
       from /usr/local/rvm/gems/ruby-2.3.4/bin/rails:22:in `load'
       from /usr/local/rvm/gems/ruby-2.3.4/bin/rails:22:in `<main>'
       from /usr/local/rvm/gems/ruby-2.3.4/bin/ruby_executable_hooks:15:in `eval'
       from /usr/local/rvm/gems/ruby-2.3.4/bin/ruby_executable_hooks:15:in `<main>'

@justusjonas74
Copy link
Author

I guess you have to define APP_PATH inside /bin/rails. I did it locale:
Load the gem locale:
GEMFILE:
gem 'gtfs_engine', :path => './plugins/gtfs_engine'

Edit /plugins/gtfs_engine/bin/rails
APP_PATH = File.expand_path('../../../../config/application', __FILE__)

But I'm not able to make it dynamic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants