0
0
Rubyprogramming~10 mins

Bundler for dependency resolution in Ruby - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to install Bundler using RubyGems.

Ruby
gem install [1]
Drag options to blanks, or click blank then click option'
Arails
Bbundler
Crake
Dsinatra
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to install 'rails' instead of 'bundler'.
Using 'bundle' instead of 'bundler' in the install command.
2fill in blank
medium

Complete the command to create a Gemfile with Bundler.

Ruby
bundle [1]
Drag options to blanks, or click blank then click option'
Aupdate
Binstall
Cexec
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bundle install' to create a Gemfile (it installs gems instead).
Using 'bundle update' which updates gems but does not create a Gemfile.
3fill in blank
hard

Fix the error in the Gemfile to specify the version of the 'rails' gem.

Ruby
gem 'rails', '[1]'
Drag options to blanks, or click blank then click option'
A>= 6.0.0
B6.0.0
C~> 6.0
Dlatest
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'latest' which is not a valid version string.
Using exact version '6.0.0' which is too strict for updates.
4fill in blank
hard

Fill both blanks to install gems and update the Gemfile.lock file.

Ruby
bundle [1] && bundle [2]
Drag options to blanks, or click blank then click option'
Ainstall
Bupdate
Cexec
Dclean
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'exec' which runs a command but does not install or update gems.
Using 'clean' which removes unused gems but does not install or update.
5fill in blank
hard

Fill all three blanks to define a gem with a version constraint and group it under development.

Ruby
group :development do
  gem '[1]', '[2]'
end

bundle [3]
Drag options to blanks, or click blank then click option'
Apry
B~> 0.13.1
Cinstall
Drspec
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'rspec' gem but forgetting to specify version.
Using 'bundle update' instead of 'bundle install' after editing Gemfile.