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

Can't install into Rails 3 project #15

Open
jamie opened this issue Apr 29, 2019 · 7 comments
Open

Can't install into Rails 3 project #15

jamie opened this issue Apr 29, 2019 · 7 comments

Comments

@jamie
Copy link
Contributor

jamie commented Apr 29, 2019

I'm trying to add this to a Rails 3 project to start a Rails 4 upgrade, and ignoring #9 it won't even bundle. It seems ten_years_rails says it requires actionview for something, and that was only introduced as a standalone gem with rails 4 so the install fails:

Bundler could not find compatible versions for gem "activesupport":
  In snapshot (Gemfile.lock):
    activesupport (= 3.2.22.13)

  In Gemfile:
    ten_years_rails was resolved to 0.2.0, which depends on
      actionview was resolved to 4.1.0.beta1, which depends on
        activesupport (= 4.1.0.beta1)

    rails (~> 3.2.22.13) was resolved to 3.2.22.13, which depends on
      activesupport (= 3.2.22.13)

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

@jamie I think it might be solved in #14. Could you test with that branch?

Also, just curious, what version of Ruby are you using?

@jamie
Copy link
Contributor Author

jamie commented Apr 29, 2019

I think that #14 doesn't go far enough, it's still got spec.add_dependency "actionview" which will conflict dependencies with Rails 3 eventually. I'll give it a shot this afternoon though.

Currently we're running ruby 2.1, but I want to push for a 2.2 upgrade since that will give us compatibility through to rails 5.2.

@jamie
Copy link
Contributor Author

jamie commented Apr 29, 2019

@etagwerker yeah, loading it as gem 'ten_years_rails', github: 'fastruby/ten_years_rails_conf_2018', branch: 'fixes/ruby-2-2-syntax-error' gives me the same thing, actionview pulling in a conflicting activesupport version.

@etagwerker
Copy link
Contributor

@jamie I guess there are two ways to install ten_years_rails, using your Gemfile and bundler or simply with gem install ten_years_rails -- have you tried with gem install ten_years_rails?

@stoem
Copy link

stoem commented Jan 23, 2023

Just warming this up, I used gem install ten_years_rails in a Rails 3 app and it gave me

You have already activated activesupport 5.2.8.1, but your Gemfile requires activesupport 3.2.22.29. Prepending bundle exec to your command may solve this.

I tried with bundle exec and got

can't find executable bundle_report for gem ten_years_rails. ten_years_rails is not currently included in the bundle, perhaps you meant to add it to your Gemfile?

Any tips?

@etagwerker
Copy link
Contributor

etagwerker commented Jan 23, 2023

@stoem There's a fork of this gem called next_rails that doesn't have the dependency on activesupport. You might wanna give it a try.

The other alternative is to add ten_years_rails to your gemfile, bundle, and try again.

@stoem
Copy link

stoem commented Jan 23, 2023

@etagwerker Thank you, go it. Next_rails works for me.

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