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

Using iqvoc as a rails engine, template doesn't apply? #393

Open
ldodds opened this issue Jul 23, 2018 · 7 comments
Open

Using iqvoc as a rails engine, template doesn't apply? #393

ldodds opened this issue Jul 23, 2018 · 7 comments

Comments

@ldodds
Copy link

ldodds commented Jul 23, 2018

I'm unclear about how to go about starting a new rails project using iqvoc as an engine.

With Rails 5.2.0 installed if I follow the commands in the documentation to download the template and then apply it:

rails new iqvoc_sample -m template.rb

The generated project doesn't have any obvious iqvoc additions, e.g. no app/assets/javascripts/manifest.js file as created in the template. And no rake commands as noted here.

Downgrading to Rails 4.2.0 and running again, I end up with

The template [/home/ldodds/workspaces/openactive/template.rb] could not be loaded. Error: No such file or directory @ rb_sysopen - /home/ldodds/workspaces/openactive/iqvoc_foobar/config/initializers/session_store.rb

If I want to create a rails application that uses iqvoc functionality, but which has a customised UI, can you clarify the steps to achieve that?

@ldodds
Copy link
Author

ldodds commented Jul 23, 2018

Generating a new vanilla Rails app, then adding gem 'iqvoc' results in this when i run bundler:

Fetching gem metadata from https://rubygems.org/................
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "nokogiri":
  In snapshot (Gemfile.lock):
    nokogiri (= 1.8.4)

  In Gemfile:
    capybara (< 4.0, >= 2.15) was resolved to 3.4.1, which depends on
      nokogiri (~> 1.8)

    capybara (< 4.0, >= 2.15) was resolved to 3.4.1, which depends on
      nokogiri (~> 1.8)

    capybara (< 4.0, >= 2.15) was resolved to 3.4.1, which depends on
      nokogiri (~> 1.8)

    iqvoc was resolved to 4.11.0, which depends on
      nokogiri (~> 1.6.0)

    rails (~> 5.2.0) was resolved to 5.2.0, which depends on
      actionpack (= 5.2.0) was resolved to 5.2.0, which depends on
        rails-html-sanitizer (>= 1.0.2, ~> 1.0) was resolved to 1.0.4, which depends on
          loofah (>= 2.2.2, ~> 2.2) was resolved to 2.2.2, which depends on
            nokogiri (>= 1.5.9)

    rails (~> 5.2.0) was resolved to 5.2.0, which depends on
      actionmailer (= 5.2.0) was resolved to 5.2.0, which depends on
        rails-dom-testing (~> 2.0) was resolved to 2.0.3, which depends on
          nokogiri (>= 1.6)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "rails":
  In snapshot (Gemfile.lock):
    rails (= 5.2.0)

  In Gemfile:
    rails (~> 5.2.0)

    iqvoc was resolved to 3.2.3, which depends on
      rails (~> 3.0.9)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

@ldodds
Copy link
Author

ldodds commented Jul 23, 2018

Any suggestions appreciated. I'm keen to explore customising iqvoc for a project.

I have the source code checked out and running locally to confirm the tools meets my requirements. But want to explore using as an engine rather than creating a fork as I think that will be harder to maintain.

@philippneugebauer
Copy link
Contributor

philippneugebauer commented Jul 23, 2018

As bundler tells you, iqvoc does not work with Rails > 4.2

If you need it, we are happy to accept a PR :)

@ldodds
Copy link
Author

ldodds commented Jul 23, 2018

@philippneugebauer I don't need higher than 4.2 but I can't get it to work with that version either.

I downgraded to Rails 4.2.0, downloaded the template and tried to generate an app. I ended up with

The template [/home/ldodds/workspaces/openactive/template.rb] could not be loaded. Error: No such file or directory @ rb_sysopen - /home/ldodds/workspaces/openactive/iqvoc_foobar/config/initializers/session_store.rb

Editing the template to remove reference to the missing file got me as far as bundler, which then failed because of another issue :/

It would be useful to know if the problem with the template occurs for anyone else, then I know it must be some combination of gem/bundler versions.

@philippneugebauer
Copy link
Contributor

I didn't have this problem, when I set up a new iQvoc few weeks ago.

@ldodds
Copy link
Author

ldodds commented Oct 17, 2018

Returned to try this again.

$ ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
$ rails -v
Rails 4.2.0
$ bundler -v
Bundler version 1.15.4

The bundle install after applying the template fails with:

Gem::InstallError: cancancan requires Ruby version >= 2.2.0.
An error occurred while installing cancancan (2.3.0), and Bundler cannot continue.
Make sure that `gem install cancancan -v '2.3.0'` succeeds before bundling.

I tried using Ruby 2.1 as that's whats noted in README.

Retrying:

$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
$ rails -v
Rails 4.2.0
$ bundler -v
Bundler version 1.16.6

Generating the application fails after the bundle install with:

         run  bundle exec spring binstub --all
/home/ldodds/.rvm/gems/ruby-2.2.0/gems/bundler-1.16.6/lib/bundler/spec_set.rb:91:in `block in materialize': Could not find nokogiri-1.7.2 in any of the sources (Bundler::GemNotFound)

I've also tried checking out the sample app, but that fails to run.

I'm really keen to trial iqvoc for an application, I can proceed with creating a fork to test a proof-of-concept, but would be interested to know what combination of rails, ruby, bundler versions plus any other changes that people have found successful.

@paulwalk
Copy link

paulwalk commented May 3, 2019

@philippneugebauer I don't need higher than 4.2 but I can't get it to work with that version either.

I downgraded to Rails 4.2.0, downloaded the template and tried to generate an app. I ended up with

The template [/home/ldodds/workspaces/openactive/template.rb] could not be loaded. Error: No such file or directory @ rb_sysopen - /home/ldodds/workspaces/openactive/iqvoc_foobar/config/initializers/session_store.rb

Editing the template to remove reference to the missing file got me as far as bundler, which then failed because of another issue :/

It would be useful to know if the problem with the template occurs for anyone else, then I know it must be some combination of gem/bundler versions.

Yes - I have reproduced this problem. I cannot get the engine template to work.

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

3 participants