From dc9362689c02630248660542969611e71493d2d0 Mon Sep 17 00:00:00 2001 From: Kuniaki IGARASHI Date: Tue, 9 Jul 2013 07:26:50 +0900 Subject: [PATCH] Adopt to Rails4. --- _posts/2012-04-18-app.markdown | 16 ++-------------- _posts/2013-05-02-install.markdown | 12 ++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/_posts/2012-04-18-app.markdown b/_posts/2012-04-18-app.markdown index 27f43d33..fdc04c5d 100644 --- a/_posts/2012-04-18-app.markdown +++ b/_posts/2012-04-18-app.markdown @@ -110,7 +110,7 @@ The app doesn't look very nice yet. Let's do something about that. We'll use the Open `app/views/layouts/application.html.erb` in your text editor and above the line {% highlight erb %} -<%= stylesheet_link_tag "application" %> +<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> {% endhighlight %} add @@ -251,19 +251,7 @@ Now refresh your browser to see what changed. If you try to open [http://localhost:3000](http://localhost:3000) it still shows the "Welcome aboard" page. Let's make it redirect to the ideas page. -On Mac OS X and Linux, in the terminal run: - -{% highlight sh %} -rm public/index.html -{% endhighlight %} - -On Windows, in the command prompt run: - -{% highlight bat %} -del public\index.html -{% endhighlight %} - -Then open `config/routes.rb` and after the first line add +Open `config/routes.rb` and after the first line add {% highlight ruby %} root :to => redirect('/ideas') diff --git a/_posts/2013-05-02-install.markdown b/_posts/2013-05-02-install.markdown index 9dce3209..f512bf8e 100644 --- a/_posts/2013-05-02-install.markdown +++ b/_posts/2013-05-02-install.markdown @@ -36,6 +36,12 @@ Click the Apple menu and choose *About this Mac*. Double click the downloaded file and it will unpack it into the current directory. Double click the the newly unpacked 'RailsInstaller-1.0.3-osx-10.7.app' or 'RailsInstaller-1.0.3-osx-10.6.app' and follow the instructions. It will open a README file with 'Rails Installer OS X' at the top. Please **ignore** the instructions in this file. +If the Rails version wasn't latest, you could update it using a following command on terminal. + +{% highlight sh %} +gem update rails --no-ri --no-rdoc +{% endhighlight %} + **Final step.** Install a text editor to edit code files. For the workshop we recommend the text editor Sublime Text. * [Download Sublime Text and install it](http://www.sublimetext.com/2) @@ -48,6 +54,12 @@ Now you should have a working Ruby on Rails programming setup. Congrats! Download [RailsInstaller](http://rubyforge.org/frs/download.php/76862/railsinstaller-2.2.1.exe) and run it. Click through the installer using the default options. +If the Rails version wasn't latest, you could update it using a following command on "Command Prompt with Ruby on Rails". + +{% highlight sh %} +gem update rails --no-ri --no-rdoc +{% endhighlight %} + Installation of Git and SSH-keys is required if you want to [put your app online with Heroku](/heroku). **Final step.** You also need a text editor to edit code files. For the workshop we recommend the text editor Sublime Text.