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? #20

Open
tute opened this issue Apr 28, 2016 · 12 comments
Open

Rails 5 support? #20

tute opened this issue Apr 28, 2016 · 12 comments

Comments

@tute
Copy link

tute commented Apr 28, 2016

When bundling a project that I'm upgrading to Rails 5, I see:

wistia-api was resolved to 0.2.3, which depends on
      activeresource (>= 2.3.8) was resolved to 2.3.8, which depends on
        activesupport (= 2.3.8)

I'm not sure why it chooses such an early version if the gemspec allows any future one. Has anyone seen this issue as well?

@tute
Copy link
Author

tute commented May 23, 2016

ping @freerobby and @jeffvincent. Do you have plans to fix this gem's dependencies so that it can be used in Rails 5 apps? Thanks!

@freerobby
Copy link
Member

freerobby commented May 23, 2016

@tute Have you tried running gem update activesupport or gem update activeresource? We are not binding to a specific version, just specifying 2.3.8 as a minimum. Rails 5 is compatible with >= 2.3.8, as it is a higher major version. I think what's happening under the hood is that your Gemfile.lock is pegged to a specific version of ActiveResource. Can you try running gem update activeresource and see if that helps?

@tute
Copy link
Author

tute commented May 23, 2016

Thanks for your help. There is certainly a weird interaction in my Gemfile. Without wistia-api gem I don't have activeresource loaded whatsoever. This is the Gemfile that doesn't bundle:

source "https://rubygems.org"

ruby "2.3.0"

gem "airbrake", "~> 4.3.1"
gem "analytics-ruby", require: "segment/analytics"
gem "autoprefixer-rails"
gem "aws-sdk", "~> 2.3"
gem "axlsx_rails"
gem "bourbon", "~> 4.2.4"
gem "clearance"
gem "coffee-rails", "~> 4.1.0"
gem "delayed_job_active_record"
gem "flutie"
gem "high_voltage"
gem "i18n-tasks"
gem "intercom"
gem "jquery-rails"
gem "neat", "~> 1.7.0"
gem "newrelic_rpm", ">= 3.9.8"
gem "normalize-rails", "~> 3.0.0"
gem "paperclip", "~> 5.0.0.beta2"
gem "pg"
gem "puma"
gem "rack-canonical-host"
gem "rails", "~> 5.0.0.rc1"
gem "recipient_interceptor"
gem "refills"
gem "sass-rails", "~> 5.0"
gem "scenic"
gem "simple_form"
gem "title"
gem "uglifier"
gem "wisper"
gem "wistia-api", github: "wistia/wistia-api"

group :development do
  gem "foreman"
  gem "quiet_assets"
  gem "spring"
  gem "spring-commands-rspec"
  gem "web-console"
end

group :development, :test do
  gem "awesome_print"
  gem "bullet"
  gem "bundler-audit", require: false
  gem "byebug"
  gem "dotenv-rails"
  gem "factory_girl_rails"
  gem "pry-rails"
  gem "rspec-rails", "~> 3.5.0.beta3"
  gem "teaspoon-jasmine"
end

group :test do
  gem "capybara-webkit", ">= 1.2.0"
  gem "database_cleaner"
  gem "email_spec"
  gem "formulaic"
  gem "launchy"
  gem "shoulda-matchers", require: false
  gem "simplecov", require: false
  gem "timecop"
  gem "webmock"
  gem "wisper-rspec", require: false
end

group :staging, :production do
  gem "rails_stdout_logging"
  gem "rack-timeout"
end

@DanielKehoe
Copy link

DanielKehoe commented Jun 18, 2016

I cannot install the wistia-api gem with Rails 5.0.0.rc1. Saw activeresource issue #215 (rails/activeresource#215) and added to the gemfile:

# required for wistia-api gem:
gem 'rails-observers', github: 'rails/rails-observers'
gem 'activeresource', github: 'rails/activeresource'

and was able to bundle install without an error.

@sublimecoder
Copy link

Still see errors with this. You can get the wistia gem to bundle install with these extra lines

gem 'rails-observers', github: 'rails/rails-observers'
gem 'activeresource', github: 'rails/activeresource'

but those gems have their own run time issues which show up once you run tests against them. So it really does not solve the issue only bandaids them.

@freerobby
Copy link
Member

freerobby commented Jul 11, 2016

@DanielKehoe @sublimecoder @tute Thanks. I was able to reproduce this locally. This looks like a problem with bundler to me. With a clean rails 5.0.0.rc1 app, I'm seeing:

    wistia-api was resolved to 0.1.0, which depends on
      activeresource (> 2.3.8) was resolved to 2.3.9, which depends on
        activesupport (= 2.3.9)

It seems to be interpreting our > 2.3.8 requirement as a ~> 2.3.8. I'm not sure why it's resolving to 2.3.9 rather than 5.0, which obviously meets both our > 2.3.8 requirement and those of your application. The reason that specifying a github key/value fixes this is that it installs from the latest source on Github (effectively 5.0 devel branch) rather than deriving a version, which is where it's failing. I will look into this in more detail when I have some more time.

@rocketbop
Copy link

@freerobby Do you think this will be fixed at some point?

@freerobby
Copy link
Member

freerobby commented Aug 31, 2016

@paublyrne I'm not sure what the best way is to address this given Bundler's pessimistic versioning spec -- even if you give it an optimistic version it interprets it pessimistically. I believe this is intentional, per their docs, but the wording around their example is a little ambiguous.

Give me a day or so to reflect on this; at minimum I will find and post a workaround.

@etcook
Copy link

etcook commented Oct 17, 2016

@freerobby Any word on this? Thanks!

@freerobby
Copy link
Member

@etook Sorry, I took this discussion into #22, but never pulled it back into this issue. As I just summarized there, the complexities of ActiveSupport and ActiveResource make it very difficult to add this gem into a Rails 5 app safely. I don't think I can mitigate all of those problems in a way that I'm comfortable telling people to use this gem in that environment. The best course of action for Rails 5 users right now is to manage your own HTTP calls to Wistia rather than rely on our client library. Sorry I don't have a better answer.

@passalini
Copy link

+1

@eliotsykes
Copy link

I'm pretty sure I've seen the Wistia 0.2.3 gem working in a Rails 5.0.x app. Can anyone else confirm? Perhaps this issue can be closed.

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

Successfully merging a pull request may close this issue.

8 participants