GoogleCloudPlatform / GoogleCloudPlatform/ruby-docs-samples

bookshelf: missing Gemfile.lock, missing updates

Open
#1,613 0 comments 0 reactions 0 assignees View on GitHub
samples
Dominant language
Ruby
Stars
235
Forks
210
PR merge metrics
No merged PRs in 30d

Description

Multiple errors recurring on getting-started/bookshelf nightly tests, which reports argument and nomethod errors on dependencies

```
An error occurred while loading ./spec/features/book_management_spec.rb.
Failure/Error: require File.expand_path("../../config/environment", __FILE__)

ArgumentError:
wrong number of arguments (given 3, expected 2)
# ./config/environment.rb:18:in `'
# ./spec/spec_helper.rb:17:in `'
# ./spec/features/book_management_spec.rb:14:in `'

An error occurred while loading ./spec/models/book_spec.rb.
Failure/Error: require File.expand_path("../../config/environment", __FILE__)

NoMethodError:
undefined method `operations' for #

MiddlewareStackProxy.new(@operations + other.operations, @delete_operations + other.delete_operations)
^^^^^^^^^^^
# ./config/environment.rb:18:in `'
# ./spec/spec_helper.rb:17:in `'
# ./spec/models/book_spec.rb:14:in `'
No examples found.
```

It looks like dependabot isn't updating this sample. There's no committed Gemfile.lock, that is being updated in other samples.

It's stuck with a very out dated version of Rails which isn't supported on the current Ruby Oldest (https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html)

This sample would need to be updated to latest Rails versions and manually updated if any updates required for mulitple major version updates.

Contributor guide

Open the contributing guide

Research direction

Start with getting-started/bookshelf/config/environment.rb and the dependency setup, then run the failing specs in spec/features/book_management_spec.rb and spec/models/book_spec.rb. Update the sample's Rails dependencies and commit its Gemfile.lock, then verify the nightly tests no longer report the loading errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
backend, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.