Basic notes on working with a Ruby / Ruby On Rails application
- gem -- RubyGems is used to manage Ruby libraries. The application is called with "gem". It interfaces with Ruby Gem repositories like RubyGems .
- bundle -- Bundle is used to manage dependencies for Ruby applications, it is a layer above "gem". Bundle can also execute project-related tasks like starting the rails server that serves up the application.
- Gemfile -- The Gemfile is input for the bundle tool . It is a file that lists the requested dependencies, their versions, and which repository to download them from.
- Rake -- Rake is a Ruby-specific build program , inspired by Make.
- Rails -- Rails is a web development platform.
- RVM -- Ruby Version Manager is used to handle ruby versions. We can use it to install versions and to mark which version we want to use. RVM can intelligently select the correct Ruby version for the directory we are currently in, if the directory contains a Gemfile that indicates which ruby version to use.
Installing a new language version
Run the commands in the project root directory.
rvm install ruby-2.7.0 rvm use 2.7.0
Downloading the necessary packages
First we update our version of bundler, to make sure it matches the project's version.
gem install bundler
Then we ask bundle to install the newest versions of the dependencies.
Finally, we can try to run the application:
bundle exec rails server
After several rounds of updates Ruby versions, updated to bundler, and updates to dependencies, we should be able to successfully run the application.