You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix "uninitialized constant Gem" and other Travis errors (#1914)
* Fix RuboCop violation
* Update test harness for Bundler 1.16 compatibility
This commit fixes Travis failures due to the recent introduction of
Bundler 1.16.0. Both are related to the new style of binstubs that are
generated by 1.16.0.
First, add `bundler` to the list of binstubs that we explicitly generate
when creating the test Rails app. The `bin/bundle` binstub that ships as
part of `rails new` is in the pre-1.16 format, and conflicts with the
1.16 format binstubs that are generated for rake and rspec. Fix this by
replacing the default `bin/bundle` with a fresh one generated by
`bundle binstubs bundler --force`.
Second, the `Bundle.with_clean_env` wrapper seems to remove some
important information from the environment that causes binstubs to fail
with errors like `uninitialized constant Gem (NameError)`. Fix this by
using `Bundle.with_original_env` instead (which is what the Bundler
documentation recommends). Because Travis also sets its own
`BUNDLER_GEMFILE` variable, I had to also reset that one manually.
* Choose cuke tags based on correct RAILS_VERSION
* Travis needs doc gems in order to run bin/yard
* Add --no-rc flag for more reliable local testing
The rspec-rails acceptance tests use `rails new` to generate a sample
app for running tests. If a developer running the rspec-rails test suite
has a `.railsrc` file, this will affect the app that is generated,
causing specs to fail.
This commit fixes this by passing the `--no-rc` flag so that `rails new`
ignores the developer's local `.railsrc`.
0 commit comments