From 2d0acc38b1a352901d65e97d6a63680284ce9a30 Mon Sep 17 00:00:00 2001 From: Takuya N Date: Mon, 2 Jan 2023 22:31:45 +0900 Subject: [PATCH] Rewrite guides/rails from HAML to Markdown (#1046) Signed-off-by: Takuya Noguchi --- source/guides/rails.html.haml | 76 ----------------------------------- source/guides/rails.html.md | 73 +++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 76 deletions(-) delete mode 100644 source/guides/rails.html.haml create mode 100644 source/guides/rails.html.md diff --git a/source/guides/rails.html.haml b/source/guides/rails.html.haml deleted file mode 100644 index 48c5818a99..0000000000 --- a/source/guides/rails.html.haml +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: How to use Bundler with Rails ---- -.container.guide - #intro - Rails comes with baked in support with bundler. - - %h2 How to use Bundler with Rails - - .contents - .bullet - .description - Install Rails as you normally would. Use sudo - if you would normally use sudo to install gems. - .how - :code - $ gem install rails - .notes - We recommend using rvm for dependable Ruby - installations, especially if you are switching - between different versions of Ruby - - .bullet - .description - Generate a Rails app as usual - :code - $ rails new myapp - $ cd myapp - .bullet - .description - Run the server. Bundler is transparently managing - your dependencies! - :code - $ rails server - .bullet - .description - Add new dependencies to your Gemfile as you - need them. - :code - # lang: ruby - gem 'nokogiri' - gem 'geokit' - .bullet - .description - If you want a dependency to be loaded only in - a certain Rails environment, place it in a group - named after that Rails environment - :code - # lang: ruby - group :test do - gem 'rspec' - gem 'faker' - end - .bullet - .description - You can place a dependency in multiple groups - at once as well - :code - # lang: ruby - group :development, :test do - gem 'wirble' - gem 'ruby-debug' - end - = link_to 'Learn More: Groups', './groups.html', class: 'btn btn-primary' - - .bullet - .description - After adding a dependency, if it is not yet - installed, install it - .how - :code - $ bundle install - .notes - This will update all dependencies in your - Gemfile to the latest versions that do not - conflict with other dependencies diff --git a/source/guides/rails.html.md b/source/guides/rails.html.md new file mode 100644 index 0000000000..5910ff6606 --- /dev/null +++ b/source/guides/rails.html.md @@ -0,0 +1,73 @@ +--- +title: How to use Bundler with Rails +--- + +Rails comes with baked in support with bundler. + +## How to use Bundler with Rails + +Install Rails as you normally would. Use sudo +if you would normally use sudo to install gems. + +~~~ +$ gem install rails +~~~ + +We recommend using rvm for dependable Ruby +installations, especially if you are switching +between different versions of Ruby +Generate a Rails app as usual + +~~~ +$ rails new myapp +$ cd myapp +~~~ + +Run the server. Bundler is transparently managing +your dependencies! + +~~~ +$ rails server +~~~ + +Add new dependencies to your Gemfile as you +need them. + +~~~ruby +gem 'nokogiri' +gem 'geokit' +~~~ + +If you want a dependency to be loaded only in +a certain Rails environment, place it in a group +named after that Rails environment + +~~~ruby +group :test do + gem 'rspec' + gem 'faker' +end +~~~ + +You can place a dependency in multiple groups +at once as well + +~~~ruby +group :development, :test do + gem 'wirble' + gem 'ruby-debug' +end +~~~ + +Learn More: Groups + +After adding a dependency, if it is not yet +installed, install it + +~~~ +$ bundle install +~~~ + +This will update all dependencies in your +Gemfile to the latest versions that do not +conflict with other dependencies