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 not found on use case with Bundler #9

Closed
junaruga opened this issue Jun 25, 2020 · 2 comments
Closed

rake not found on use case with Bundler #9

junaruga opened this issue Jun 25, 2020 · 2 comments

Comments

@junaruga
Copy link

I expected this project worked on Bundler, as I saw Gemfile on the project.

$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]

$ bundle install --path vendor/bundle

$ bundle exec rake -T
bundler: failed to load command: rake (/usr/local/ruby-2.7.1/bin/rake)
Gem::Exception: can't find executable rake for gem rake. rake is not currently included in the bundle, perhaps you meant to add it to your Gemfile?
  /usr/local/ruby-2.7.1/lib/ruby/2.7.0/bundler/rubygems_integration.rb:374:in `block in replace_bin_path'
  /usr/local/ruby-2.7.1/lib/ruby/2.7.0/bundler/rubygems_integration.rb:402:in `block in replace_bin_path'
  /usr/local/ruby-2.7.1/bin/rake:23:in `<top (required)>'

Do you have a reason not to do like this?

$ git diff
diff --git a/.travis.yml b/.travis.yml
index 0d92a15..9d2c642 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,4 +9,4 @@ rvm:
   - "2.6"
   - "2.7"
   - "ruby-head"
-script: rake
+script: bundle exec rake
diff --git a/abrt.gemspec b/abrt.gemspec
index 7b40c32..f3d33fa 100644
--- a/abrt.gemspec
+++ b/abrt.gemspec
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
     s.cert_chain = ["voxik-public_cert.pem"]
   end
 
+  s.add_development_dependency(%q<rake>)
   s.add_development_dependency(%q<rspec>, ["~> 3.5"])
 end
@voxik
Copy link
Owner

voxik commented Jun 26, 2020

I already don't remember precisely, but I think that Travis is using Bundler to install dependencies. That is the only use case I have for Bundler. I don't see any other reason why it should be used to execute the test suite. If there is other way to install dependencies on Travis, I might consider removing Gemfile.

@junaruga
Copy link
Author

I don't see any other reason why it should be used to execute the test suite. If there is other way to install dependencies on Travis, I might consider removing Gemfile.

It's okay not to do it. The merit to use bundler is you can test abrt-ruby with the specific version or the latest version's rspec and rake, sharing developers the reproducing way through Gemfile relatively easiler. But the demerit for using Bundler might make the more complexity for this project.

I would close the ticket.

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