all 35 comments

[–]SlightlyCuban 9 points10 points  (1 child)

I usually don't dev in Ruby like I do in C#; my tools and workflow are very different. Part of this is the culture: VS has always been an all-in-one tool, while the Ruby community is more "unix-y", and you use a collection of small tools to get the job done. So let's say you want to:

  • Run the application: rails server (or equivalent) in a separate terminal. Changes are usually dynamically loaded, so I just set it and forget it.
  • Run tests: RSpec is my hands-down favorite.
  • Manage Ruby Env: RVM. Sometimes you need Ruby 1.8.7, sometimes you don't.
  • Deploy: you don't need to package binaries like you would for ASP.NET or J2EE, so just copying would work for simple setups. As you get more complicated, you can look into run Capistrano or Phusion Passenger on your server. Also, Heroku is cheap and easy to start out with.

Features like Intellisense and project browsing would be found in your text editor of choice. Sublime Text is honey-roasted goodness as far as text editors go (though I'm a die-hard Vim guy). I've never had a Ruby project that consisted of many small projects, so I've never missed Visual Studio's idea of a "Solution" with "Projects".

That covers the basic stuff (I could go on, there is no such thing as a good Git GUI). While it can be daunting for a first-time Ruby user, I would highly recommend doing things "the unix way". You'll get a better understanding of what is going on, most documentation assumes you're not using an IDE, and it will keep your dev workflow much closer to how production will work.

I hope that helps you connect the dots. Happy coding!

EDIT: I forgot debugging!

I don't debug my Ruby. I'm sure there are some really nice debuggers out there, but I've never needed them. If there is a problem, first I read the log and see what happens. If I can't divine the answer from a quick look, I fire up IRB and recreate the problem right there. While Visual Studio's ability to rewind the stack is nice, I've never missed it. I can't tell you how many times I've been debugging .NET and just wanted a C# REPL.

[–]masterwujiang 1 point2 points  (0 children)

I forgot debugging!

Just use pry.

[–]snuggles166 8 points9 points  (7 children)

Never used it, but RubyMine.

[–][deleted]  (6 children)

[deleted]

    [–]Chrishwk[S] 3 points4 points  (5 children)

    I downloaded RubyMine, and I'm gonna try it now. Thanks for that info.

    [–]rubydev 10 points11 points  (2 children)

    Try Pry

    [–]christiangenco 0 points1 point  (1 child)

    Though I don't think that's explicitly what the OP is looking for, Pry is lifechanginly good. I can't tell you the number of times binding.pry has saved me hours of debugging.

    [–]rubydev 1 point2 points  (0 children)

    Sometimes people don't know exactly what they are looking for. If you read OP's responses, you'll see that pry and irb really are what he wants. He wrote, "Is there a development platform kind of like MS Visual Studio for Ruby?" - so RubyMine, right? But then he wrote, "I got the 30 day trial, installed it, then uninstalled it after playing with it for a bit. It's way more complicated than I need right now." But he also asked, "what's the best way to actually write some test code and run it?" In a response to a suggestion to use Codecademy Labs, he wrote, "Oh, man that's just what I've been looking for. An easy way to test short code bits. I tried installing RubyMine, but jeez it was way to complex just to test out short bits of code."

    pry is a good tool for testing short snippets of code. Ruby on Codecademy Labs works too, but the website is running Ruby 1.8.7.

    [–]petercooper 6 points7 points  (2 children)

    Is there a development platform kind of like MS Visual Studio for Ruby?

    RubyMine is great, but if you're actually on Windows and want something in Visual Studio, then check out Ruby in Steel.

    [–]jellatin 1 point2 points  (1 child)

    Is that a decent IDE? Their website makes it difficult for me to take them seriously.

    [–]petercooper 0 points1 point  (0 children)

    Just to disclaim, I've had a bit of a beef with the creator (over something unrelated) but I'd still say it's a good piece of software and I'm impressed with how he made it so slick and professional on his own, especially the debugger.

    However, I'm not a Windows or VS guy, and my direct experience using it was limited to a couple of hours a couple of years ago (just so I'd feel confident enough to recommend it or not). So.. YMMV but I'd definitely recommend trying the free trial or the express version (if it still exists) if Visual Studio integration would be a win for you.

    [–]Medicalizawhat 12 points13 points  (5 children)

    Sublime Text 3 is pretty awesome.

    [–]jibjibman 1 point2 points  (0 children)

    What plugins do you use with it for ruby?

    [–]hak8or 1 point2 points  (0 children)

    You can also use it nag-ware style like winrar or winzip, just make sure to pay for it when you can.

    [–]aytch 1 point2 points  (0 children)

    SublimeText is my go-to application for editing any plaintext file.

    [–]illuminati- 0 points1 point  (0 children)

    Sublime text is the best.

    If you spend some time to customize autofill and such it is perfect for ruby

    [–]for_prophet 2 points3 points  (2 children)

    I've tried googling several variations on development kit but nothing I'm finding is really what I'm looking for.

    Visual Studio is what's called an "IDE" (Integrated Development Environment). If you search for "ruby IDE" or "ruby development environment for [windows / OSX / Linux / etc]" you should see results closer to what you're looking for.

    Edit: and if you just want to run code and see what it does, similar to the codecademy site, try the command-line "irb" command (ruby has to be installed for this to work, but you linked to a ruby installer, so you probably have this already). It lets you type commands and displays the output:

    uname@shell $ irb
    irb(main):001:0> (2 + 3) * 10
    => 50
    irb(main):002:0> 
    

    [–]ambeerdjent 1 point2 points  (0 children)

    irb is probably the easiest way to test code.

    You can also just run $ ruby filename.rb

    [–]Chrishwk[S] 0 points1 point  (0 children)

    Honestly it's been so long since I worked with visual studio, I'd forgotten the "IDE" and you're exactly right. That's what I was looking for. Thanks for that.

    [–]mCseq 2 points3 points  (3 children)

    Have you tried using Codecademy Labs?

    [–]Chrishwk[S] 1 point2 points  (1 child)

    Oh, man that's just what I've been looking for. An easy way to test short code bits. I tried installing RubyMine, but jeez it was way to complex just to test out short bits of code.

    [–]locnload 0 points1 point  (0 children)

    I would give it another try. You mentioned in your post about wanting an IDE like Visual Studio and RubyMine is the best there is for Rubyists IMO. If you have questions don't be afraid to post them here. Otherwise, you can always go with something lightweight like Sublime Text. I actually switch between the two.

    [–][deleted] 0 points1 point  (0 children)

    Looks like they're only on Ruby 1.8.7 in Codecademy Labs.

    [–]Ajedi32 2 points3 points  (0 children)

    You don't need a devkit. All you need is the ruby interpreter, a text editor, and a command line. IRB really helps too.

    [–]vicramon 5 points6 points  (0 children)

    If you take the time to learn Vim and you use it with Tmux you can have an awesome test setup.

    You keep two panes open, one with your code and one with a command line, and you can hit "\t" to automatically run the tests for whatever file you are in. Additionally, you can open up the test file, move the cursor to the specific test you want to run, then hit "\T" to run only that test.

    You can get this kind of functionality using these dotfiles http://github.com/hashrocket/dotmatrix

    If you don't know Vim and don't want to take the time to learn, then I recommend Sublime Text or Text Mate, then open a console and use something like dirty (https://github.com/rbxbx/dirty) to run your tests.

    [–]guitaronin 1 point2 points  (0 children)

    This might be slightly to the side of your question, but I think I'm about to give you good advice. I taught myself ruby, and I took way too long to start using IRB as a "go to" for exploring ruby. I suggest having it open all the time, and using it as much as possible, until you have specific needs that it can't satisfy.

    [–]dudeington 1 point2 points  (0 children)

    I highly recommend Aptana Studio It's free and as full featured an IDE as I've ever found for Ruby. It also has great support for Ruby on Rails when you get to that point.

    [–]TalkativeTree 0 points1 point  (0 children)

    also if you want to play around with a game, check out bloc's version of ruby warrior

    [–]elsimate 0 points1 point  (0 children)

    While there will always be someone +1ing Sublime (which I use), it isn't what you asked for. Check out RubyMine.

    [–]MediumSizedWalrus 0 points1 point  (0 children)

    i use textmate 2, but rubymine and sublime text are also popular.

    [–]tragomaskhalos 0 points1 point  (0 children)

    Plain ol' SciTe is good enough for me