diff --git a/lib/doc_page.rb b/lib/doc_page.rb index 0848933b1..655955a9c 100644 --- a/lib/doc_page.rb +++ b/lib/doc_page.rb @@ -4,7 +4,6 @@ require 'erector_scss' require 'titleizer' require 'html5_page' -require 'flags' require 'erb' class DocPage < Html5Page @@ -41,7 +40,7 @@ def file_name end def git_url - "https://github.com/railsbridge/docs/blob/master/sites/#{@locale}/#{site.name}/#{file_name}" + "https://github.com/railsbridge-montreal/docs/blob/master/sites/#{@locale}/#{site.name}/#{file_name}" end def src_url @@ -69,12 +68,11 @@ def body_content div(class: "navbar-header cf title") { a(href: "/#{site.name}") { - span("RailsBridge ", class: "brand") + span("RailsBridge Montreal ", class: "brand") text site_title } } ul(class: "navbar-nav nav") { - widget Flags, locale: @locale li(class: "dropdown") { a("sites", href: "#", class: "dropdown-toggle", "data-toggle" => "dropdown") @@ -127,7 +125,7 @@ def body_content end p do text "Source: " - url "https://github.com/railsbridge/docs" + url "https://github.com/railsbridge-montreal/docs" end } end diff --git a/lib/flags.rb b/lib/flags.rb deleted file mode 100644 index 1e6372d31..000000000 --- a/lib/flags.rb +++ /dev/null @@ -1,37 +0,0 @@ - -# Flag icons borrowed from https://www.gosquared.com/resources/flag-icons/ -# Put them in public/flags -class Flags < Erector::Widget - needs :locale - - def initialize *args - super - @locales = ["en", "es", "zh-tw"] - end - - def image_for_locale(locale) - image_name = {"en" => "us"}[locale.to_s] || locale - "/flags/#{image_name.upcase}.png" - end - - def subdomain_for_locale(locale) - {"en" => "docs"}[locale.to_s] || locale - end - - def content - li class: 'dropdown' do - a class: 'dropdown-toggle', 'data-toggle' => 'dropdown', href: '#' do - img src: image_for_locale(@locale) - end - ul class: 'flags dropdown-menu' do - @locales.each do |locale| - li { - a(href:"http://#{subdomain_for_locale(locale)}.railsbridge.org") { - img src: image_for_locale(locale) - } - } - end - end - end - end -end diff --git a/lib/site_extensions/installfest.rb b/lib/site_extensions/installfest.rb index 37d1dd809..df287fdeb 100644 --- a/lib/site_extensions/installfest.rb +++ b/lib/site_extensions/installfest.rb @@ -5,7 +5,7 @@ def version_string(name) when :minimum_ruby '2.2.2' when :osx_ruby_short - '2.3' + '2.3.1' when :windows_ruby_short '2.2' else diff --git a/sites/en/docs/docs.step b/sites/en/docs/docs.step index af1496f2f..e7aae1849 100644 --- a/sites/en/docs/docs.step +++ b/sites/en/docs/docs.step @@ -1,5 +1,5 @@ message <our Discourse forum. (Volunteers to answer questions always needed, too!) MARKDOWN diff --git a/sites/en/frontend/get_a_sticker.step b/sites/en/frontend/get_a_sticker.step index 87344521f..ce0ef46e6 100644 --- a/sites/en/frontend/get_a_sticker.step +++ b/sites/en/frontend/get_a_sticker.step @@ -10,7 +10,7 @@ end verify "you can open a local webpage in a browser" do message <<-MESSAGE -Create a new file called `sticker.html` by opening it in Sublime Text 2 or your preferred editor. +Create a new file called `sticker.html` by opening it in Sublime Text or your preferred editor. Make a note of where you save it, you'll need to know in a second. Fill it with the following contents: diff --git a/sites/en/frontend/tool_installation.step b/sites/en/frontend/tool_installation.step index 4922fcbcd..0d9ed60c3 100644 --- a/sites/en/frontend/tool_installation.step +++ b/sites/en/frontend/tool_installation.step @@ -46,10 +46,10 @@ steps do end step "Install a text editor" do - a "Download and install Sublime Text 2", :href => "http://www.sublimetext.com/2" - message "Install Sublime Text 2 by double clicking the file you downloaded, then dragging the Sublime Text 2 icon into the Applications folder. Finish up by clicking the eject icon for Sublime Text 2 in your finder window." + a "Download and install Sublime Text", :href => "http://www.sublimetext.com/3" + message "Install Sublime Text by double clicking the file you downloaded, then dragging the Sublime Text icon into the Applications folder. Finish up by clicking the eject icon for Sublime Text in your finder window." a "or install a different editor", :href => "/installfest/editors" - message "FYI: Sublime Text 2 is a paid program that you can download and try out for free. If you keep using Sublime Text 2 after the workshop, you'll need to buy a license. There are other editors available you can find on [our editors page](/installfest/editors)." + message "FYI: Sublime Text is a paid program that you can download and try out for free. If you keep using Sublime Text after the workshop, you'll need to buy a license. There are other editors available you can find on [our editors page](/installfest/editors)." end end end @@ -64,6 +64,6 @@ steps do tip "A note about your password. In order to push to GitHub, you'll need to type your password in at the terminal. So make it something easy to remember and type but hard to guess." end - next_step "get_a_sticker" + next_step "sanity_check" end diff --git a/sites/en/installfest/_install_sublime_text_2_for_mac.step b/sites/en/installfest/_install_sublime_text_2_for_mac.step index 68dfc4fb6..cf44df861 100644 --- a/sites/en/installfest/_install_sublime_text_2_for_mac.step +++ b/sites/en/installfest/_install_sublime_text_2_for_mac.step @@ -1,26 +1,26 @@ -message "We'll be using the Sublime Text 2 text editor during the workshop, though you are free to use a different editor if you prefer. It must be a plain-text editor, such as vi or TextMate." +message "We'll be using the Sublime Text text editor during the workshop, though you are free to use a different editor if you prefer. It must be a plain-text editor, such as vi or TextMate." important <<-MARKDOWN Microsoft Word and other word processing programs, including TextEdit and Notepad, will not work. - When in doubt, use Sublime Text 2. + When in doubt, use Sublime Text. MARKDOWN -step "Download Sublime Text 2" do - message "Download the [Sublime Text 2 installer](http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.dmg)." +step "Download Sublime Text 3" do + message "Download the [Sublime Text 3 installer](https://download.sublimetext.com/Sublime%20Text%20Build%203124.dmg)." end step 'Select "Open with DiskImageMounter" in the file save dialog' do message "This should be the default." - message "It will open an installer with a Sublime Text 2 icon and a picture of your Applications folder. Something like this:" + message "It will open an installer with a Sublime Text icon and a picture of your Applications folder. Something like this:" img src: 'img/install_sublime_text.png', alt: 'Contents of the sublime text package showing a sublime text icon and a shortcut to applications' end -step "Drag Sublime Text 2 into your Applications folder." do - message "It will open an installer with a Sublime Text 2 icon and a picture of your Applications folder. Drag Sublime Text 2 into your Applications folder." +step "Drag Sublime Text into your Applications folder." do + message "It will open an installer with a Sublime Text icon and a picture of your Applications folder. Drag Sublime Text into your Applications folder." end step "Unmount the installer disk image" do diff --git a/sites/en/installfest/_install_text_editor_windows.step b/sites/en/installfest/_install_text_editor_windows.step new file mode 100644 index 000000000..49169d4a8 --- /dev/null +++ b/sites/en/installfest/_install_text_editor_windows.step @@ -0,0 +1,9 @@ +message "You need a text editor to do Ruby. If you already have a preferred text editor, such as vi, emacs, jedit, etc., you can skip this step. It must be a plain text editor and not something with styling like Microsoft Word or WordPad." + +message "Notepad is not a good programming editor, but it will work in a pinch." + +important "**When in doubt, use Sublime Text.**" + +message "[Sublime Text](http://www.sublimetext.com/3) is a good option, if you don't have one yet." + +message "Download Sublime Text here: " \ No newline at end of file diff --git a/sites/en/installfest/_install_textmate.step b/sites/en/installfest/_install_textmate.step index b6a86ef09..9596a7be5 100644 --- a/sites/en/installfest/_install_textmate.step +++ b/sites/en/installfest/_install_textmate.step @@ -1,6 +1,6 @@ message <<-MARKDOWN -Sublime Text 2 isn't compatible with versions of OS X lower than 10.6 so we'll use Textmate (which is still widely used by Rails developers), you are free to use a different editor if you prefer. It must be a plain-text editor. +Sublime Text isn't compatible with versions of OS X lower than 10.7 so we'll use Textmate (which is still widely used by Rails developers), you are free to use a different editor if you prefer. It must be a plain-text editor. MARKDOWN diff --git a/sites/en/installfest/create_a_heroku_account.step b/sites/en/installfest/create_a_heroku_account.step index 1f227dc3d..eff3b4e4d 100644 --- a/sites/en/installfest/create_a_heroku_account.step +++ b/sites/en/installfest/create_a_heroku_account.step @@ -1,3 +1,5 @@ +important "Skip this step if you are in the Intro to Programming course." + message "We'll be using Heroku to put our apps online because it's simple and free for the tier we'll be needing." step "Visit the Heroku web site" do diff --git a/sites/en/installfest/create_an_ssh_key.step b/sites/en/installfest/create_an_ssh_key.step index 90ce41541..1b0234c1e 100644 --- a/sites/en/installfest/create_an_ssh_key.step +++ b/sites/en/installfest/create_an_ssh_key.step @@ -1,3 +1,5 @@ +important "Skip this step if you are in the Intro to Programming course." + message "An SSH key uniquely identifies you (and your computer) when your computer is communicating with other computers. Think of an SSH key as a fancy password." message "You'll need one of these to create your Heroku and Github accounts." diff --git a/sites/en/installfest/deploy_a_rails_app.step b/sites/en/installfest/deploy_a_rails_app.step index 724eb4d77..536970d43 100644 --- a/sites/en/installfest/deploy_a_rails_app.step +++ b/sites/en/installfest/deploy_a_rails_app.step @@ -85,6 +85,12 @@ step "Deploy your app to Heroku" do message "SQLite and PostgreSQL are different kinds of databases. We're using SQLite for our development and test environments because it's simple to install. We're using PostgreSQL in our production environment because Heroku has done the hard work of installing it for us and it's more powerful than SQLite. We have separate test, development and production databases by default in Rails." end + message "If you are using Vagrant, do the following step. If you are not sure you are using Vagrant, check if you see 'Railsbridge VM' before your cursor." + + console <<-BASH +sudo apt-get install sqlite3 libsqlite3-dev + BASH + console <<-BASH gem install bundler bundle install --without production @@ -151,6 +157,10 @@ bundle install --without production console "heroku run rake db:migrate" + message "If that does not work and you get an error message along the lines of 'Error connecting to process'" + + console "heroku run:detached rake db:migrate" + result <<-OUTPUT Migrating to CreateDrinks (20160706063236) == 20160706063236 CreateDrinks: migrating ===================================== @@ -180,5 +190,5 @@ bundle install --without production end end -next_step "get_a_sticker" +next_step "sanity_check" diff --git a/sites/en/installfest/img/install_sublime_text.png b/sites/en/installfest/img/install_sublime_text.png index b01c2c4e4..c912b9500 100644 Binary files a/sites/en/installfest/img/install_sublime_text.png and b/sites/en/installfest/img/install_sublime_text.png differ diff --git a/sites/en/installfest/installfest.step b/sites/en/installfest/installfest.step index 933a26844..12b3c7c37 100644 --- a/sites/en/installfest/installfest.step +++ b/sites/en/installfest/installfest.step @@ -1,4 +1,4 @@ -message "This is a set of step-by-step instructions for installing Ruby, Rails, and other important tools on Mac, Windows, or Linux computers. Originally developed for the [Railsbridge Workshops](http://railsbridge.org), it is a community-supported open-source documentation project. If you want to contribute, click the [git] link at the top-right corner of any page and submit your change on GitHub." +message "This is a set of step-by-step instructions for installing Ruby, Rails, and other important tools on Mac, Windows, or Linux computers. Especially for Windows computers, it is different from the installation processused by other Railsbridge workshops" message "**You'll repeat all these steps tomorrow, but more slowly so you can better understand what's going on under the hood.** Today we just want to check that everything's set up and ready for tomorrow." @@ -45,7 +45,7 @@ Here's a list of tools you'll be installing. As you go through the workshop, we' * **Git**. A revision or source control system. It creates a repository, which is a complete history of your programming changes, so you can undo changes and roll back to previous versions of your work if something has gone wrong. * **GitHub**. (optional) * **Heroku**. An application server, which hosts your application during development. This allows you to get your application online and interact with it from any browser, instead of just on your local machine. -* **Sublime Text 2** (or [some other editor](editors)). To write programs in Ruby, you need a text editor to create, edit and save Ruby files. +* **Sublime Text** (or [some other editor](editors)). To write programs in Ruby, you need a text editor to create, edit and save Ruby files. * Various useful "**Ruby gems**". Ruby gems are useful bits of Ruby code that someone has created for reuse, so you don't have to write it yourself. Including... * bundler * sqlite @@ -54,7 +54,7 @@ You will also create an account on Heroku, an application hosting platform. If you already have an account on Heroku, make sure you know your username and password. -If you've already installed the above tools and are confident they are setup correctly, skip ahead to the Get a Sticker step. +If you've already installed the above tools and are confident they are setup correctly, skip ahead to the Get a Sticker step. MARKDOWN end diff --git a/sites/en/installfest/linux.step b/sites/en/installfest/linux.step index c7f512d29..b9e40cb3b 100644 --- a/sites/en/installfest/linux.step +++ b/sites/en/installfest/linux.step @@ -77,12 +77,12 @@ step "Install Rails" do console "gem install rails" end -step "Sublime Text 2" do +step "Sublime Text" do message <<-MARKDOWN -If you don't have a preferred code editor, you can install Sublime Text 2. It's available for [32-bit machines](http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.tar.bz2) and [64-bit machines](http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1%20x64.tar.bz2) +If you don't have a preferred code editor, you can install Sublime Text. It's available for [32-bit machines](https://download.sublimetext.com/sublime_text_3_build_3124_x32.tar.bz2) and [64-bit machines](https://download.sublimetext.com/sublime_text_3_build_3124_x64.tar.bz2) -Check for the latest version. +Check for the latest version. MARKDOWN tip "How many bits?" do diff --git a/sites/en/installfest/osx_rvm.step b/sites/en/installfest/osx_rvm.step index dda81fb2a..dbe616767 100644 --- a/sites/en/installfest/osx_rvm.step +++ b/sites/en/installfest/osx_rvm.step @@ -53,7 +53,7 @@ step "Install Rails" do end end -step "Install Sublime Text 2" do +step "Install Sublime Text" do insert "install_sublime_text_2_for_mac" end diff --git a/sites/en/installfest/get_a_sticker.step b/sites/en/installfest/sanity_check.step similarity index 78% rename from sites/en/installfest/get_a_sticker.step rename to sites/en/installfest/sanity_check.step index 3cd4e25a5..e7d4b00fe 100644 --- a/sites/en/installfest/get_a_sticker.step +++ b/sites/en/installfest/sanity_check.step @@ -1,3 +1,5 @@ +important "Skip to step 3 if you are in the Intro to Programming course." + step "Have a volunteer check your tool versions" do message "Find a volunteer and have them watch the next steps." @@ -32,6 +34,15 @@ step "Show your Heroku app to a volunteer" do message "Visit the heroku site you made on the previous page and create a new drink." end +step "RSVP for tomorrow's workshop" do + console "curl -s http://www.railsbridge-montreal.com/checks/script | ruby -" + + result "You have the prerequisites installed for the following classes:\n" \ + "Introduction to programming: Yes\n" \ + "Introduction to Rails: Yes\n" \ + "Rails for Developers: Yes" \ +end + step "Congratulations!" do message "You get a sticker! (Or a high-five if there aren't any stickers)." end diff --git a/sites/en/installfest/windows.step b/sites/en/installfest/windows.step index 24f8c3b7e..38700903f 100644 --- a/sites/en/installfest/windows.step +++ b/sites/en/installfest/windows.step @@ -1,154 +1,11 @@ -message <<-MARKDOWN -These instructions should work for all versions of Windows from XP to Windows 8. +step "Choose your instructions" do + message "Make your choice based on the workshop you will be attending tomorrow." -You may need to login as Administrator, or give the Administrator password when installing some programs, depending on your Windows version and user settings. -MARKDOWN - -step "Run RailsInstaller" do - message "RailsInstaller includes Rails, Ruby, Git and SQLite." - message "Go to , scroll to the 'Downloads' section, and download the RailsInstaller for Windows/Ruby #{version_string(:windows_ruby_short)}." - message "Click on the downloaded file to run the install wizard. Click Next at each step to accept the defaults." - message "Be sure to check the boxes for *Install git (recommended)* and *Add executables for Ruby, DevKit Git (if checked above) to the PATH*" - - img src: "img/WinRailsInstaller.jpg", alt: "Screenshot showing location of checkboxes for ensuring that Git is installed" - - message "Rails will be installed in C:\\RailsInstaller and the directory for your Rails projects will be C:\\Sites" -end - -step "Configure your git and ssh environment" do - - important "At the end of the installer there will be a checkbox asking 'Configure git and ssh when installation has completed'. **Leave this box checked.** It will open a terminal window that you need to **type into**." - - message "When it asks *Please enter your name, for example mine is: Wayne E. Seguin*" - message "Type *your actual full name* into the console and press **[enter]**" - - message "When it asks *Please enter your email address, for example mine is: wayneeseguin@gmail.com*" - message "Type *your actual email address* into the console and press **[enter]**" - - important "Use the **same email address** for heroku, git, github, and ssh." - - tip do - message "After this step you will have some **git config settings** and you will also have an **ssh key**." - end - - message "Here is a summary of your settings after this process:" - - img src: 'img/railsbridge_windowsScreenshot-commandprompt_ror.png', alt: "Screenshot showing correct git, ruby, rails and ssh settings" - - message "Close the command prompt window." -end - -step "Update Git" do - - message "The version of Git that comes with RailsInstaller is old, so we will be updating that next." - - message "Go to and download the installer. You want version 1.9.5 or newer." - - message "Run the installer, and it will ask you where you want to install it. Change it FROM C:\\Program Files\\Git TO, C:\\RailsInstaller\\Git like the picture below." - - img src: 'img/directory.png', alt: "Screenshot showing the step of installation where the location to install git is set" - - message "It will warn you that the directory already exists. Click yes to install to that folder anyway." - - message "Keep going using the default selections and you'll have the latest version of Git installed!" - -end - -step "Open a Terminal" do - message "Much of using Rails is typing commands and hitting **[enter]**. Your experience using Rails on Windows greatly depends on your making friends with the terminal window. Normally you will work in a terminal window and keep it open along with your browser." - - tip "The Terminal is also called the Command Prompt, Command Line, DOS Prompt, or DOS Window." - - message "RailsInstaller made a special Terminal for you to use when you're working on Ruby, Rails, or Git." - - message "To open the special Terminal, search for **Command Prompt with Ruby and Rails**." - - div do - option_half "Windows 7" do - img src: 'img/railsbridge_windows_findingCommandPrompt_win7.png', alt: "Screenshot showing search for command prompt" - end - - option_half "Windows 8" do - img src: 'img/railsbridge_windows_findingCommandPrompt_win8.png', alt: "Screenshot showing search for command prompt" - end - end - - message "You should do all your Rails work in this RailsInstaller DOS window." - - tip "Pin It to Win It" do - message 'Pinning the Command Prompt to the taskbar is a handy shortcut.' - - img src: 'img/railsbridge_windowsScreenshot-commandprompt-pinnedtotaskbar.png', alt: 'Pin the Command Prompt to the Task Bar' + option "Introduction to Programming" do + link "windows_railsinstaller" end -end - -a name: 'install-node' -step "Install Node.js" do - - message "Go to and download the installer. Pick the one that is \"recommended for most users.\"" - - message "Click on the downloaded file to run the install wizard. Click Next at each step to accept the defaults." - - message "**Reboot your computer.**" - - message "Once your computer is back up, load **Command Prompt with Ruby and Rails** and..." - - console "node -v" - fuzzy_result "v4{FUZZY}.x.x{/FUZZY}" -end -step "Update Rails" do - message "Currently, RailsInstaller installs Rails 4.1.x, but we want the latest. Upgrading Rails is pretty easy:" - - console "gem install rails --no-document" - - message "...and you're done. New Rails! Woo." -end - -step "Sanity Check" do - - console "ruby -v" - fuzzy_result "ruby #{version_string(:windows_ruby_short)}{FUZZY}.4{/FUZZY}" - - console "rails -v" - fuzzy_result "Rails 5.0{FUZZY}.x{/FUZZY}" - - console "git --version" - fuzzy_result "git version 2{FUZZY}.9.2.windows.1{/FUZZY}" -end - -step "Configure the Windows Terminal" do - message "Take a moment to configure the *Command Prompt with Ruby and Rails* so that it is a good height and width and has a nice font. Hint -- click to open the link below, and when you finish those steps, hit the **back** button in your browser to resume this procedure." - - link "configure_the_windows_terminal" - - tip "Clearing the Terminal" do - message "If you ever want to clear the terminal of all its cluttered output" - console "cls" - end - - tip "Command History" do - message "The terminal window stores a \"command history.\" To view and re-run previous commands, use the <up arrow> and <down arrow> keys. You can also edit a previous command and run it -- this is handy for long commands, or fixing mistakes, or for cycles (series of commands) that you repeat." - end - - tip "Copy and Paste" do - - message "It's usually better to type commands in yourself. It takes a little longer but you learn more." - - message "But if you must... in these instructions, where it says: \"Type this in the terminal:\", you can usually copy the command from this page, and right click in the menu bar or terminal window, then click on \"Paste\", then hit the **[enter]** key." + option "Introduction to Rails or Rails for Developers" do + link "windows_vagrant" end end - -step "Install a Text Editor" do - message "You need a text editor to do Ruby. If you already have a preferred text editor, such as vi, emacs, jedit, etc., you can skip this step. It must be a plain text editor and not something with styling like Microsoft Word or WordPad." - - message "Notepad is not a good programming editor, but it will work in a pinch." - - important "**When in doubt, use Sublime Text 2.**" - - message "[Sublime Text 2](http://www.sublimetext.com/2) is a good option, if you don't have one yet." - - message "Download Sublime Text 2 here: " -end - -next_step "create_a_heroku_account" diff --git a/sites/en/installfest/windows_railsinstaller.step b/sites/en/installfest/windows_railsinstaller.step new file mode 100644 index 000000000..86e27393d --- /dev/null +++ b/sites/en/installfest/windows_railsinstaller.step @@ -0,0 +1,147 @@ +step "Choose your instructions" do + message "Make your choice based on the workshop you will be attending tomorrow." + + tip "You may need to login as Administrator, or give the Administrator password when installing some programs, depending on your Windows version and user settings." +end + + +step "Run RailsInstaller" do + message "RailsInstaller includes Rails, Ruby, Git and SQLite." + message "Go to , scroll to the 'Downloads' section, and download the RailsInstaller for Windows/Ruby #{version_string(:windows_ruby_short)}." + message "Click on the downloaded file to run the install wizard. Click Next at each step to accept the defaults." + message "Be sure to check the boxes for *Install git (recommended)* and *Add executables for Ruby, DevKit Git (if checked above) to the PATH*" + + img src: "img/WinRailsInstaller.jpg", alt: "Screenshot showing location of checkboxes for ensuring that Git is installed" + + message "Rails will be installed in C:\\RailsInstaller and the directory for your Rails projects will be C:\\Sites" +end + +step "Configure your git and ssh environment" do + + important "At the end of the installer there will be a checkbox asking 'Configure git and ssh when installation has completed'. **Leave this box checked.** It will open a terminal window that you need to **type into**." + + message "When it asks *Please enter your name, for example mine is: Wayne E. Seguin*" + message "Type *your actual full name* into the console and press **[enter]**" + + message "When it asks *Please enter your email address, for example mine is: wayneeseguin@gmail.com*" + message "Type *your actual email address* into the console and press **[enter]**" + + important "Use the **same email address** for heroku, git, github, and ssh." + + tip do + message "After this step you will have some **git config settings** and you will also have an **ssh key**." + end + + message "Here is a summary of your settings after this process:" + + img src: 'img/railsbridge_windowsScreenshot-commandprompt_ror.png', alt: "Screenshot showing correct git, ruby, rails and ssh settings" + + message "Close the command prompt window." +end + +step "Update Git" do + + message "The version of Git that comes with RailsInstaller is old, so we will be updating that next." + + message "Go to and download the installer. You want version 1.9.5 or newer." + + message "Run the installer, and it will ask you where you want to install it. Change it FROM C:\\Program Files\\Git TO, C:\\RailsInstaller\\Git like the picture below." + + img src: 'img/directory.png', alt: "Screenshot showing the step of installation where the location to install git is set" + + message "It will warn you that the directory already exists. Click yes to install to that folder anyway." + + message "Keep going using the default selections and you'll have the latest version of Git installed!" + +end + +step "Open a Terminal" do + message "Much of using Rails is typing commands and hitting **[enter]**. Your experience using Rails on Windows greatly depends on your making friends with the terminal window. Normally you will work in a terminal window and keep it open along with your browser." + + tip "The Terminal is also called the Command Prompt, Command Line, DOS Prompt, or DOS Window." + + message "RailsInstaller made a special Terminal for you to use when you're working on Ruby, Rails, or Git." + + message "To open the special Terminal, search for **Command Prompt with Ruby and Rails**." + + div do + option_half "Windows 7" do + img src: 'img/railsbridge_windows_findingCommandPrompt_win7.png', alt: "Screenshot showing search for command prompt" + end + + option_half "Windows 8" do + img src: 'img/railsbridge_windows_findingCommandPrompt_win8.png', alt: "Screenshot showing search for command prompt" + end + end + + message "You should do all your Rails work in this RailsInstaller DOS window." + + tip "Pin It to Win It" do + message 'Pinning the Command Prompt to the taskbar is a handy shortcut.' + + img src: 'img/railsbridge_windowsScreenshot-commandprompt-pinnedtotaskbar.png', alt: 'Pin the Command Prompt to the Task Bar' + end +end + +a name: 'install-node' +step "Install Node.js" do + + message "Go to and download the installer. Pick the one that is \"recommended for most users.\"" + + message "Click on the downloaded file to run the install wizard. Click Next at each step to accept the defaults." + + message "**Reboot your computer.**" + + message "Once your computer is back up, load **Command Prompt with Ruby and Rails** and..." + + console "node -v" + fuzzy_result "v4{FUZZY}.x.x{/FUZZY}" +end + +step "Update Rails" do + message "Currently, RailsInstaller installs Rails 5.0.x, but we want the latest. Upgrading Rails is pretty easy:" + + console "gem install rails --no-document" + + message "...and you're done. New Rails! Woo." +end + +step "Sanity Check" do + + console "ruby -v" + fuzzy_result "ruby #{version_string(:windows_ruby_short)}{FUZZY}.4{/FUZZY}" + + console "rails -v" + fuzzy_result "Rails 5.0{FUZZY}.x{/FUZZY}" + + console "git --version" + fuzzy_result "git version 2{FUZZY}.9.2.windows.1{/FUZZY}" +end + +step "Configure the Windows Terminal" do + message "Take a moment to configure the *Command Prompt with Ruby and Rails* so that it is a good height and width and has a nice font. Hint -- click to open the link below, and when you finish those steps, hit the **back** button in your browser to resume this procedure." + + link "configure_the_windows_terminal" + + tip "Clearing the Terminal" do + message "If you ever want to clear the terminal of all its cluttered output" + console "cls" + end + + tip "Command History" do + message "The terminal window stores a \"command history.\" To view and re-run previous commands, use the <up arrow> and <down arrow> keys. You can also edit a previous command and run it -- this is handy for long commands, or fixing mistakes, or for cycles (series of commands) that you repeat." + end + + tip "Copy and Paste" do + + message "It's usually better to type commands in yourself. It takes a little longer but you learn more." + + message "But if you must... in these instructions, where it says: \"Type this in the terminal:\", you can usually copy the command from this page, and right click in the menu bar or terminal window, then click on \"Paste\", then hit the **[enter]** key." + end +end + +step "Install a Text Editor" do + insert "install_text_editor_windows" +end + +next_step "create_a_heroku_account" diff --git a/sites/en/installfest/windows_vagrant.step b/sites/en/installfest/windows_vagrant.step new file mode 100644 index 000000000..5e4b03fe0 --- /dev/null +++ b/sites/en/installfest/windows_vagrant.step @@ -0,0 +1,117 @@ +message "These instructions should work for all versions of Windows from XP to Windows 8." + +message "You may need to login as Administrator, or give the Administrator password when installing some programs, depending on your Windows version and user settings." + +message "Installing Ruby and Rails on Windows is easy thanks to the RailsBridge Virtual Machine." +message "This setup will give you Ruby, Rails, Git and the Bash shell. Let's get started." + +message "Make sure you have performed the pre-workshop steps." + + +step "Launch Git" do + + message "Launch Github for Windows. It will install a few dependencies. Once this is done, you may close it again." + + message "Launch the Git Shell. You can find a shortcut on your Desktop (grey circle with a cat), or locate **Git Shell** in All Programs under GitHub. A new (mostly black) window will open." + +end + +step "Set up your Vagrant box" do + + message "If the file [railsbridgevm-2016-09.box](http://downloads.railsbridge.org/railsbridgevm-2016-09.box) file you downloaded before the workshop isn't on your desktop, move it there." + + message "Then type the following commands. Press ENTER after each command and wait for the operation to finish before typing the next one." + + console <<-BASH + mkdir ~/Desktop/railsbridge + cd ~/Desktop/railsbridge + vagrant box add --name railsbridgemontreal railsbridgevm-2016-09.box + vagrant init railsbridgemontreal + vagrant up + vagrant ssh + BASH + + message "If the process seems to hang after vagrant up, try hitting the ENTER key to get it going." + + message "After typing the last command, here is what you should see (approximately):" + + console <<-BASH + C:\\Users\\DiligentStudent\\Desktop\\railsbridge> vagrant init railsbridgemontreal + + A `Vagrantfile` has been placed in this directory. You are now + ready to `vagrant up` your first virtual environment! Please read + the comments in the Vagrantfile as well as documentation on + `vagrantup.com` for more information on using Vagrant. + C:\\Users\\DiligentStudent\\Desktop\\railsbridge> vagrant up + BASH + + message "Bringing machine 'default' up with 'virtualbox' provider..." + + console <<-BASH + ...many lines left out... + [default] -- /vagrant + C:\\Users\\Diligent Student\\Desktop\\railsbridge> vagrant ssh + Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686) + ...many lines left out... + Changing directory to the shared ~/workspace folder for your convenience. + [RailsBridge VM] ~/workspace$ + BASH + +end + +step "Open another Vagrant shell" do + message "Leave this terminal window open on your computer. To open an extra Terminal (console) into the virtual machine, open another Git Shell window, then type:" + + console <<-BASH + cd ~/Desktop/railsbridge + vagrant ssh + [RailsBridge VM] ~/workspace$ + BASH + + message "Continue with the next step of the Installfest. @TODO LINKY BACK" +end + +step "Usage Tips" do + tip "Turning the virtual machine off and on" do + + message "When you're done for the day, logout and stop your machine:" + + console <<-BASH + logout + vagrant halt + BASH + + message "And close the Git Shell window." + + message "When you want to use the virtual machine (tomorrow morning, for instance), start your machine. Launch Git Shell, then:" + + console <<-BASH + cd ~/Desktop/railsbridge + vagrant up + vagrant ssh + BASH + end + + tip "Clearing the Terminal" do + message "If you ever want to clear the terminal of all its cluttered output" + console "clear" + end + + tip "Command History" do + message "The terminal window stores a \"command history.\" To view and re-run previous commands, use the <up arrow> and <down arrow> keys. You can also edit a previous command and run it -- this is handy for long commands, or fixing mistakes, or for cycles (series of commands) that you repeat." + end + + tip "Copy and Paste" do + + message "It's usually better to type commands in yourself. It takes a little longer but you learn more." + + message "But if you must... in these instructions, where it says: \"Type this in the terminal:\", you can usually copy the command from this page, and right click in the menu bar or terminal window, then click on \"Paste\", then hit the **[enter]** key." + end +end + +step "Install a Text Editor" do + insert "install_text_editor_windows" +end + + +next_step "configure_git" diff --git a/sites/en/intro-to-rails/getting_started.step b/sites/en/intro-to-rails/getting_started.step index ccd896ad0..a1addc291 100644 --- a/sites/en/intro-to-rails/getting_started.step +++ b/sites/en/intro-to-rails/getting_started.step @@ -41,7 +41,7 @@ steps do end step do - console "rails new suggestotron" + console "rails new suggestotron -m https://raw.github.com/railsbridge-montreal/rails_template/master/intro_to_rails.rb" message "`rails new` creates a new Rails project with the name you give." message "In this case we told it to create a new project called `suggestotron`. We'll go into detail on what it created shortly." message "This will print a lot of stuff to the screen and can take a while to finish." @@ -60,7 +60,7 @@ Open the suggestotron folder as a project in your text editor. tip "Close any files that are already open. They might be from yesterday's `test_app`, and we want to make sure that we're editing files in today's `suggestotron` app." message <<-MARKDOWN -In **Sublime Text 2**, you can use the `Project > Add Folder to Project...` menu option: +In **Sublime Text**, you can use the `Project > Add Folder to Project...` menu option: ![Sublime Text Project menu screenshot](img/sublime_add_folder_to_project.png) diff --git a/sites/en/intro-to-rails/redirect_to_the_topics_list_after_creating_a_new_topic.step b/sites/en/intro-to-rails/redirect_to_the_topics_list_after_creating_a_new_topic.step index 8c60ed7c1..be00becf0 100644 --- a/sites/en/intro-to-rails/redirect_to_the_topics_list_after_creating_a_new_topic.step +++ b/sites/en/intro-to-rails/redirect_to_the_topics_list_after_creating_a_new_topic.step @@ -18,12 +18,12 @@ steps { message "Find the line:" - source_code :ruby, "format.html { redirect_to @topic, notice: 'Topic was successfully created.' }" + source_code :ruby, "redirect_to @topic, notice: 'Topic was successfully created.'" message 'and change `@topic` to `topics_path` like this:' - source_code :ruby, "format.html { redirect_to topics_path, notice: 'Topic was successfully created.' }" + source_code :ruby, "redirect_to topics_path, notice: 'Topic was successfully created.'" message 'so that the file looks like this:' @@ -31,14 +31,10 @@ steps { def create @topic = Topic.new(topic_params) - respond_to do |format| - if @topic.save - format.html { redirect_to topics_path, notice: 'Topic was successfully created.' } - format.json { render :show, status: :created, location: @topic } - else - format.html { render :new } - format.json { render json: @topic.errors, status: :unprocessable_entity } - end + if @topic.save + redirect_to topics_path, notice: 'Topic was successfully created.' + else + render :new end end RUBY @@ -47,12 +43,12 @@ message "In the same file, locate the update method. " message "Find the line:" - source_code :ruby, "format.html { redirect_to @topic, notice: 'Topic was successfully updated.' }" + source_code :ruby, "redirect_to @topic, notice: 'Topic was successfully updated.'" message 'and change `@topic` to `topics_path` like before:' - source_code :ruby, "format.html { redirect_to topics_path, notice: 'Topic was successfully updated.' }" + source_code :ruby, "redirect_to topics_path, notice: 'Topic was successfully updated.'" end step "Confirm your changes" do diff --git a/sites/en/job-board/make_a_jobs_home_page.step b/sites/en/job-board/make_a_jobs_home_page.step index 2fa53b5de..9fc877c9e 100644 --- a/sites/en/job-board/make_a_jobs_home_page.step +++ b/sites/en/job-board/make_a_jobs_home_page.step @@ -21,7 +21,7 @@ message <<-MARKDOWN So it's looking for a route, but can't find one. Let's add one! - Open up the routes file. It's in the config directory, called `routes.rb`. If you're using Sublime Text 2, you can open it using keyboard shortcuts: + Open up the routes file. It's in the config directory, called `routes.rb`. If you're using Sublime Text, you can open it using keyboard shortcuts: * Hitting cmd + p (on Mac) or ctl + p (on PC) * typing in `route` diff --git a/sites/en/learn-to-code/learn-to-code.md b/sites/en/learn-to-code/learn-to-code.md index 36f731881..0910bc072 100644 --- a/sites/en/learn-to-code/learn-to-code.md +++ b/sites/en/learn-to-code/learn-to-code.md @@ -70,8 +70,8 @@ Follow along at http://docs.railsbridge.org/learn-to-code * Ruby version 2.3 preferred, but 1.9+ is fine too * run `ruby -v` to check * a text editor - * e.g. Sublime Text 2 - * http://www.sublimetext.com/2 + * e.g. Sublime Text + * http://www.sublimetext.com/ * If you do not have both of these things, RAISE YOUR HAND * visit http://installfest.railsbridge.org for more instructions diff --git a/sites/en/message-board/message-board.step b/sites/en/message-board/message-board.step index 68544832d..282f81361 100644 --- a/sites/en/message-board/message-board.step +++ b/sites/en/message-board/message-board.step @@ -1,6 +1,6 @@ message <<-MARKDOWN ## Assumptions made by this curriculum -* You’ve gone through the standard RailsBridge installfest and have successfully completed the Get a Sticker step. +* You’ve gone through the standard RailsBridge installfest and have successfully completed the Get a Sticker step. * You’ve gone through the RailsBridge Suggestotron curriculum and the Job Board curriculum at least once before, or maybe a couple of times, or maybe you feel decently comfortable with Rails for some other reason. * You want to learn more Rails!!! diff --git a/sites/en/workshop/welcome.deck.md b/sites/en/workshop/welcome.deck.md index 736f26a64..b3462401e 100644 --- a/sites/en/workshop/welcome.deck.md +++ b/sites/en/workshop/welcome.deck.md @@ -88,7 +88,7 @@ We want the community of software developers to reflect the diversity of our soc * **rake**: like make for Ruby. An easy way to run tasks. * **git**: source code control. * **database**: we'll use SQLite, but could be any relational database. -* **editor**: Sublime Text 2 +* **editor**: Sublime Text * **heroku**: free Rails hosting.