Git Product home page Git Product logo

rubymine_vagrant's Introduction

Introduction

The goal of this repo is to demonstrate how Vagrant and RubyMine work together. The Vagrant file makes use of a simple bash script in the repo to install and set up a custom stack (Ubuntu, Ruby 2.1.3, rvm, bundler, etc.).

The repo contains a sample Rails application (that RubyMine syncs to the vagrant box), but the idea can easily be extended to a more complex application.

Similarly, note that the prescribed set up does not intentionally include all of the relevant rvm/rails/scripting best practices.

Steps

  1. Start RubyMine
  2. Clone this repo (from the RM dialog box or from VCS menu).
  3. Go to: Tools/Vagrant/Up. Wait till the box starts (takes a while).
  4. Go to: RubyMine/Preferences/Tools/Vagrant (see Figure 1) to confirm box appears.
  5. Go to: RubyMine/Preferences/Languages & Frameworks/RubySDK & Gems. a. Add remote SDK. Just like Figure 2, ensure that the path to remote ruby is the rvm gem folder, not remote ruby. That is, the path should be: /usr/local/rvm/gems/ruby-2.1.3 b. Make sure the default SDK selected is remote ruby by clicking on checkbox (shift green check mark). See Figure 2b.
  6. Go to: Run/Edit Configurations/Ruby SDK/Use Other SDK (Select remote SDK as in Figure 3.)
  7. Go to: Run/Run or Run/Debug (see note on debugging below). 7b. Confirm success by visiting localhost:3000/greetings/hello. See Figure 4.
  8. Finally: Tools/Vagrant/Halt (when done).

Figure 1: Confirm Vagrant Box Availability Vagrant

Figure 2: Set Remote Ruby Set Ruby Path

Figure 2b: Select Remote Ruby Set Ruby Path

Figure 3: Updating Run/Debug Configuration Edit Configurations

Figure 4: Server Running Edit Configurations

Debugging

The Gemfile does not have a debugger, so RubyMine will alert you when you try to run the debugger (via Run/Debug).

Just click on "install debase" when prompted by RubyMine (or update your Gemfile as you see fit).

Notes

If RubyMine cannot find your gems, it means that it's interacting with a wrong Ruby version on your box. Make sure you have followed the steps correctly.

rubymine_vagrant's People

Contributors

osmandin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.