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

rake commands fail if using rails 5 #681

Closed
yltsrc opened this issue Jun 28, 2015 · 30 comments
Closed

rake commands fail if using rails 5 #681

yltsrc opened this issue Jun 28, 2015 · 30 comments
Milestone

Comments

@yltsrc
Copy link

yltsrc commented Jun 28, 2015

$ rake spec
rake aborted!
LoadError: cannot load such file -- rails/test_unit/sub_test_task
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/gems/draper-2.1.0/lib/draper/tasks/test.rake:7:in `require'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/gems/draper-2.1.0/lib/draper/tasks/test.rake:7:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/gems/draper-2.1.0/lib/draper/railtie.rb:67:in `load'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/gems/draper-2.1.0/lib/draper/railtie.rb:67:in `block (2 levels) in <class:Railtie>'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/gems/draper-2.1.0/lib/draper/railtie.rb:67:in `each'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/gems/draper-2.1.0/lib/draper/railtie.rb:67:in `block in <class:Railtie>'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/railtie.rb:237:in `instance_exec'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/railtie.rb:237:in `block in run_tasks_blocks'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/railtie.rb:245:in `each'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/railtie.rb:245:in `each_registered_block'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/railtie.rb:237:in `run_tasks_blocks'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/application.rb:442:in `block in run_tasks_blocks'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/engine/railties.rb:13:in `each'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/engine/railties.rb:13:in `each'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/application.rb:442:in `run_tasks_blocks'
/home/vagrant/.rvm/gems/ruby-2.2.2@rails_5.0/bundler/gems/rails-1022796ac075/railties/lib/rails/engine.rb:460:in `load_tasks'
/home/vagrant/test_app/rakefile:7:in `<top (required)>'
(See full trace by running task with --trace)
@yltsrc
Copy link
Author

yltsrc commented Jun 28, 2015

example Gemfile

source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sprockets-rails', github: 'rails/sprockets-rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
gem 'draper'
gem 'rspec-rails'

@audionerd
Copy link

In test.rake Draper requires rails/test_unit/sub_test_task, but Rails 5 does not have that file in railties/lib/rails/test_unit anymore.

It was removed by 3297909 (see also: 8017e6a).

audionerd added a commit to audionerd/draper that referenced this issue Oct 8, 2015
This bug was causing all rake tasks to fail in Rails 5 when draper gem was present
Fixes drapergem#681
@asiniy
Copy link

asiniy commented Nov 7, 2015

@audionerd do you have any plans regarding send pull request of your 'rails5' branch to the master branch of this repo?

@audionerd
Copy link

@asiniy No, sorry, I haven't had time to dig further into Rails 5 support for Draper. My current branch was just a quick hack that "worked for me", but I didn't do any further testing.

@mayank-istar
Copy link

can any one tell me how to resolve this error.

@jasnow
Copy link

jasnow commented Dec 24, 2015

@mayank-istar - Try "gem 'draper', github: 'audionerd/draper', branch: 'rails5'"

@seanlinsley
Copy link
Member

@audionerd are you planning on opening a pull request?

@dmitry
Copy link

dmitry commented Dec 27, 2015

@audionerd would be great to see it get merged.

@ivanjolic95
Copy link

I can't pull draper from github because I'm using it in an engine as a dependency. Are there any plans to add official Rails 5 support?

@jasnow
Copy link

jasnow commented Mar 22, 2016

@ivanjolic95 : Did you try gem 'draper', github: 'audionerd/draper', branch: 'rails5' ?

@ivanjolic95
Copy link

I can't really use any fork because I cannot pull gems from github in engine's .gemspec file. I've tried to put it in the gemfile and it doesn't work.

@Mehonoshin
Copy link

Hi, folks!
I'm currently collecting all Rails 5 related fixes in single branch.
But we need an active maintainer to merge it and release new draper version.

jwidderich added a commit to bichinger/draper that referenced this issue Apr 7, 2016
Mehonoshin added a commit to Mehonoshin/draper that referenced this issue Apr 13, 2016
Fix dependency on rails/test_unit/sub_test_task (drapergem#681)
@chulkilee
Copy link

Instead of using forked version of draper, you can do monkey patch like this:

# lib/rails/test_unit/sub_test_task.rb
class Rails::SubTestTask < Rake::TestTask
end

@JohnSmall
Copy link

How come this is tagged as Closed and Merged when it very clearly isn't?

I've just created a new Rails 5 project and get this exact error.

@kyledecot
Copy link

My team is also receiving this error on various projects when attempting to move to Rails 5. Any progress on getting this fixed (without monkey patching)?

@danielricecodes
Copy link

@JohnSmall @kyledecot - same. Brand new Rails 5 project and just gem 'draper' in Gemfile. Using the fork seemed to work though.

@asiniy
Copy link

asiniy commented Oct 11, 2016

Guys, feel free to switch to the gem 'drape'. It's a draper designed for rails 5.

@dmitry
Copy link

dmitry commented Oct 11, 2016

@asiniy do you mean https://github.com/MrEmelianenko/drape? It's not developed for the last 5 months, how can anyone be sure it will be maintained in the future?

@rafaelsales
Copy link

omg, that's lame.

@keithmattix
Copy link

Still no solution for this? drape hasn't been updated in 8 months...

@seanlinsley
Copy link
Member

Could someone please open a PR?

@ghost
Copy link

ghost commented Jan 26, 2017

So, the issue is 1,5 years old and there is still no fix for that? Except the monkey patch and forked repos, of course...

@MatthiasRMS
Copy link

MatthiasRMS commented Feb 2, 2017

For Rails 5 use:
gem 'draper', "3.0.0.pre1"

Not a fork and not a monkey patch. Seems to be the "best" solution right now.

@Irostovsky
Copy link

It works with rails 5, thank you @MatthiasRMS

@sanchojaf
Copy link

Hi, same issue with gem 'rails', '~> 5.0.1'

And gem 'draper' is not working for me, I try master, rails5 branch, 3.0.0.pre1

@codebycliff codebycliff added this to the 3.0.0 milestone Mar 29, 2017
@codebycliff
Copy link
Collaborator

Is this still an issue in master?

@codebycliff
Copy link
Collaborator

I believe this is no longer an issue. Please correct me if I'm wrong and I'll take a look into it.

@kyledecot
Copy link

@codebycliff Is a new version going to be released on rubygems?

@codebycliff
Copy link
Collaborator

@kyledecot Yes, soon.. I'm hoping to have a release in the next couple weeks.

Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 25, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 26, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 26, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 27, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Sep 27, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Oct 3, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.
Alexander-Senko added a commit that referenced this issue Oct 4, 2024
## Fixed

* Ruby 2.6 (see hotwired/turbo-rails/#681).

## Changed

* Moved Rails versions to CI `matrix`.
* Both edge and outdated Ruby / Rails versions may fail.
* Use the latest RubyGems.

(cherry picked from commit 5fe90c6)
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