element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Technical Library
  • Products
  • Dev Tools
  • Technical Library
  • More
  • Cancel
Technical Library
Documents Ruby on Rails for Windows!!!
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Technical Library to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: DebuggerGuys
  • Date Created: 22 May 2012 10:45 PM Date Created
  • Last Updated Last Updated: 8 Oct 2021 4:52 AM
  • Views 464 views
  • Likes 0 likes
  • Comments 0 comments
Related
Recommended

Ruby on Rails for Windows!!!

Tumblr_lemox7bbgq1qzmq3vo1_500_large

Setting up a modern Ruby on Rails environment on a Windows computer is a tormenting experience. Even after you set it up, you'll continue to be plagued by incompatibilities. While it's possible to write Ruby code that works on any operating system, many programmers ignore the Windows platforms so that some portion of the libraries available to most programmers will not be available to Windows users. Check out this StackOverflow post for a list of all the incompatibilities and potential problems you might run into with Rails on Windows.

At one point, I would have told anyone who wanted to seriously learn how to program that they couldn't do it unless they installed Linux or bought a Mac. Thanks to virtualization technologies, we have much better options today that can give you a pretty great approximation of a Linux computer with a minimal amount of effort.

VirtualBox and Vagrant

VirtualBox is a tool from Oracle that allows you to create virtual machines on your computer. A virtual machine is essentially a whole new virtual computer inside of your own computer. Unfortunately, configuring and bootstrapping a new virtual machine can be complicated, and that's where Vagrant comes in.

Vagrant allows you to specify a "recipe" for a virtual machine inside of a single Vagrantfile and then create and bootstrap your virtual machine with a simple$ vagrant up command. I would highly recommend watching Ryan Bate's Railscast on Vagrant to get a more clear picture of how you use Vagrant. The official documentation for Vagrant is very well written and easy to understand as well, check it out at http://vagrantup.com

Setting Up Your Rails Environment

  1. Install VirtualBox: https://www.virtualbox.org/wiki/Downloads
  2. Install Vagrant: http://downloads.vagrantup.com/tags/v1.0.3
  3. Download this Vagrantfile into the directory you're going to code in:http://bloc.s3.amazonaws.com/Vagrantfile
  4. From the command line prompt, run:$ vagrant box add base http://files.vagrantup.com/lucid32.box
  5. From the command line prompt and in the directory of your Vagrantfile, run$ vagrant up Note: this could take up to an hour, and you'll get manyGem.specification deprecation warnings that you can ignore.
  6. Set up PuTTY to allow you to SSH into Vagrant (see directions on the Vagrant site in the "Using Microsoft Windows?" section here:http://vagrantup.com/docs/getting-started/ssh.html)
  7. You're now on a virtual box within your computer, except this one is running Linux. If you do $ cd /vagrant you'll be able to see the Vagrantfile you copied into a directory earlier. This is a special directory on your virtual box that links back to the directory you created from Windows. If you create a file in there from Windows, you'll be able to see it in this directory and vice versa.

Done. You now have all of the essentials of a modern Rails environment set up on an Ubuntu VirtualBox on your Windows computer. Try creating a new app within your VirtualBox with $ rails new <app name>.

If you'd like to see what you can do with your new virtual machine instance, be sure to check out the official documentation at http://vagrantup.com and the Railscast here

via BLOC NATION

  • coding
  • on
  • rails
  • up
  • ruby
  • programming
  • windows
  • for
  • set
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube