Introducing RailsInstaller »

Created at: 19.01.2011 01:02, source: Engine Yard Blog, tagged: Technology RailsInstaller Wayne E. Seguin windows

How can you share Ruby on Rails with your friends? How about giving them a Rails Welcome Kit to make it simple for them to get up and running with Rails? Enter RailsInstaller, the best one-click installer for getting started with Ruby on Rails.

Anyone new to Rails, welcome! We want to make your Rails experience straightforward and enjoyable!

So, what would you pay for such an awesome kit? $295? Probably not. $49? Maybe. $9.99? Definitely, in a heart beat. Well, you are in luck, for today and for an unlimited time into the future, RailsInstaller is Open Source and FREE for you to use!

Goodies in the Rails Welcome Kit

RailsInstaller for Windows installs several components which are key to a Rails development environment, all in one installer so that you do not have to track them down one by one. How easy is that? RailsInstaller-1.0.0.exe is a self-contained installer which will:
  • Install each component (Ruby 1.8.7RubyGems 1.4,  Rails 3Git 1.7, Sqlite3 dll & gem, DevKit ) into the destination directory (C:\RailsInstaller by default)
  • Create a ‘RailsInstaller’ start menu group with several items
  • Link the user to the RailsInstaller website, mailing list and IRC channel
What else should be included in every Rails developer’s Welcome Kit?

Why is Engine Yard doing this?

Australian Mastermind Dr Nic Williams, recently did an interview on Cloud Out Loud where he ranted about this very topic:

It turns out there are some people out there using an operating system called Windows. And they are somewhat unloved historically by both the Rails and Ruby communities…

But the great, vast majority of people who are new to Rails don’t know that yet. You, as a Windows developer, think, “I would like to play with this Rails thing.” That’s all you know. How do you use it? How do we make that experience work, so that they don’t have to go scour the internet for little scraps and ideas? It’s little things—The Rails 3 Guide, the canonical reference for how to get started in rails, refers to the Instant Rails project as a solution for how to get started in Windows. Well, the project hasn’t been updated in three years, it bundles an old, old version of Ruby— Ruby 1.8.6— that doesn’t work with Rails.

We love them so little, these Windows people, that there’s no system that’s known to work, there’s no easy, go-to place… And here at Engine Yard, it’s time for us to turn around and help the millions of Windows users who would like to start using Rails.

So we’ve started with a Rails Welcome Kit for Windows users. It is desperately needed.

We strongly believe that there is also a need for a Welcome Kit for OS/X users too. Currently you need XCode to do a few things on OS/X and Ruby. It’d be nice to package away that requirement, for example. Not everyone is on Snow Leopard and has a version of Ruby on their OS/X machine, which supports Rails 3 (it requires Ruby 1.8.7 which ships with 10.6 Snow Leopard).

Can you please help?

Our first goal is making sure that new Rails developers can easily locate  RailsInstaller when they google “Rails Windows” or “Getting Started with Rails”. This is where YOU come in! Please help us by updating any tutorials or websites to link to http://railsinstaller.org as the canonical place for anyone to get started! This will ensure that Windows users who are starting out with Rails end up using the RailsInstaller and thus have a simplified, streamlined and enjoyable "getting started" experience.

Next, I encourage you to  share Rails with all of your Windows using friends. We all love Rails. It is so wonderful. Now it is easier than ever for your friends to share the joy!

Thanks

This is a packaged goodies bag of existing projects. RailsInstaller for Windows would not be possible without two people. Luis Lavena for being part of the team that created RubyInstaller. And...Luis Lavena, for helping me navigate Windows, the packaging tools, and the surreal development world of Windows.

Thank you very much, in advance, for sharing RailsInstaller with your friends. I hope it helps them enjoy Rails.

So, what’s next?

We have an ongoing list of features/bugs/chores. The code and website are all open source.

You can follow the project on twitter at @railsinstaller, and participate in discussions on the mailing list. Also, come for a chat in #railsinstaller on IRC.

Let’s make RailsInstaller awesome and make sure the world knows it exists!


more »

JRuby on Windows »

Created at: 12.01.2011 21:44, source: Engine Yard Blog, tagged: Technology jruby windows

Did you know that JRuby on Windows had no dependencies?  You don't even need Java installed.  You don't need another Ruby installed.  You can run our installer and be creating Rails applications or Ruby GUI applications immediately. Installer splash screen

Well Duh!

Micah Martin created a Windows installer for JRuby that made JRuby much easier to install. A new user can double click on the installer, get their PATH configured, install a JVM if they need one, and have a fully functioning Ruby environment in a matter of seconds. We played with it a bit and decided it was cool beans. The rest is history. What we didn't count on was how popular Windows was as a platform. To non-Rubyists this may sound patently stupid, but as Rubyists, we mostly ignore Windows. Much to our surprise, we discovered that the number of Windows installer downloads started to match the number of downloads for our generic tar and zip downloads of JRuby. Cowabunga...people use Windows!?!!? Seeing so many Windows installer downloads was a "well duh!" moment for us. Ever since that day, we realized that as Rubyists we need to embrace Windows and make sure the Ruby Windows experience is pleasant. I am going to talk about what JRuby is doing to make Windows developers happy, but I wanted to first try and make a rally cry to Rubyists everywhere...Please help make Windows a reasonable development platform choice.

Small Plea to Rubyists

If you have ever been to a Ruby conference and stood at the front of the room you will make one fairly common observation: Pictures of Macs at conference Macs Everywhere In the public Ruby world, a Mac laptop seems like a prerequisite to membership (full-disclosure: I have been using Mac notebooks for 4-5 years). Much to Apple's credit they make very nice laptops. I think the bigger picture is seeing a laptop with 13% of the market share making up 95+% of a Ruby conference indicates a significant problem. If you are a Mac-using fork()-wielding Rubyist why should you care about Windows users? The most obvious answer to why you should care is market share. There are a tremendous number of businesses which do their day-to-day work on a Windows OS. If these Windows-using companies adopt Ruby then there are more job opportunities for all of us. A less dog-eat-dog motive is wanting to share something you love. I love using Ruby and I think any programmer, regardless of OS, should have the opportunity to use Ruby. "Ruby cares" (faint PSA music in the background) Okay, stepping off the soap box a little... If you want to help, what can you do? Of course you can start using Windows, but odds are, you bought a Mac to avoid using Windows. ;) Still, you can do several things:
  • Be helpful to anyone who submits a Windows patch to your library/application. Ultimately, little bugs here and there will make or break Ruby adoption on Windows.
  • Look for unix-y Ruby commands like fork() and consider alternatives like spoon. We can blame some of the unix-parentage of Ruby for this, but a little effort to make your code portable will make a big difference.
  • Of course, some libraries may never run on Windows. In that case, please mention that on your project's homepage. Perhaps even put a hook in your code to throw an error when being loaded from Windows.
require 'rbconfig'
if RbConfig::CONFIG['host_os'] == "mswin32"
    raise LoadError.new "This library does not work on Windows"
end
  • Make sure you are using libraries like Pathname which should help isolate you from writing Windows-unfriendly things like:
def absolute?(filename)
    filename =~ /^\//
end
You can instead rely on Pathname to do the right thing for you:
require 'pathname'
Pathname.new("c:/").absolute?  # => true
If you find yourself making assumptions about files or filesystems, odds are your code will not work on Windows.
  • Test your library on a continuous integration (CI) server running on Windows (a little more on this below).

What we are doing

We are on a never-ending quest to improve our Windows support for JRuby. Lately, we have been spending some portion of our development week dog-fooding on Windows. This has been a boon for finding issues, and we will continue this practice for the foreseeable future. Beyond dog-fooding, we have recently set up a CI instance running Windows (a long-desired item for us). We finally have quick feedback when we break something on Windows. Windows CI progress If you are interested in making your gem work on Windows, you can contact us and we will let you run your library on our CI box for a while to get it in shape for Windows. (We would extend the offer forever, but we only have so much processing power.) This can be a valuable experience in understanding some of the issues in making your code more portable. Take us up on the offer. We also wrote a native version of the windows-specific extension win32ole with funding from Audentes Technologies (thanks guys). For those unfamiliar with win32ole, it is a library which allows you to connect to Windows applications and services and call them progmatically. For example, in a few lines of Ruby you can connect up to MS Word, load a document, and then save it as an HTML document. JRuby 1.6 will bundle win32ole in our windows installer. It is also released as a gem so you can update to the latest and greatest when fixes come out. As some level of proof we have been working hard on Windows support, a majority of 1.5.x issues resolved have been Windows-related. We are going to keep polishing things until we get it right.

What will we do next?

We wanted to share some of our future Windows plans in the hopes people will have feedback and suggestions. Our next big project on Windows will be to make an 'all-in-one' installer. This installer will contain all the necessary stuff needed for a new Windows developer to go from zero to Rails. We plan on including the following in the new installer:
  • JRuby
  • JVM
  • Redcar editor (sweet Textmate clone)
  • Gems: Rails, Rake, RSpec, Rubygems, AR-JDBC
  • Simple Rails tutorials
  • Links to common Rails/Ruby websites
Our hope is that this will help give a new Windows developer a positive experience. Hitting lots of little roadblocks is no way to get introduced to a new technology.

Let's become a big tent

If you are a Windows person reading this, hopefully you can see that we are trying to make sure you have a top-notch Ruby runtime at your disposal. You can help form our future by giving us feedback on your experience. We really appreciate you giving us a try. If you are not a Windows person, then hopefully you are on-board with the idea that Ruby should run well on Windows. I believe it is one of our largest potential growth factors, and we have definitely not given an appropriate amount of support on Windows. (Note: There are some heroic souls like Luis Lavena on the Ruby C impl side who are trying -- my hat goes off to them in fighting the good fight). Let's make 2011 the year we start seeing more Windows laptops at conferences!


more »

Ruby on Rails on Windows – The Last Frontier »

Created at: 04.01.2011 22:13, source: Engine Yard Blog, tagged: Resources windows

As Ruby continues to grow and gain acceptance, one large challenge remains: developing on Windows. It's no secret that the Ruby community has been slow to welcome Windows users into our world. Projects like Instant Rails were a great start, but have long since been abandoned. For the continued momentum of Ruby, Windows users need the ease of setup and use that all the rest of us have long enjoyed. Have hope, all you Ruby Windows developers! Last week, returning Engine Yarder Wayne E. Seguin wrote about his plan to simplify and streamline the process for getting a Rails development environment on Windows. Today, we have a list of current Ruby resources for Windows users. Later this week, Tom Enebo of the JRuby Team will share more about why JRuby is a great choice for Windows Rubyists. Then, Luis Lavena will discuss other areas the community can contribute to improve Ruby performance on Windows. Brighter days are approaching for all you Ruby Windows users!

Ruby Resources for Windows Users

Tools

  • Ruby Installer - RubyInstaller is the de facto method for quickly and easily setting up Ruby on a Windows machine. RubyInstaller is an installer for Windows that includes the Ruby language, an execution environment, and RubyGems.
  • DevKit - After using RubyInstaller, some gems will not work. To remedy this, the RubyInstaller team has released a DevKit that contains the tools needed to compile these gems. This can be downloaded from the RubyInstaller downloads page.
  • Git For Windows - Download Git for Windows. One of the popular Git clients currently is TortoiseGit.
  • Pik - Pik allows you to manage multiple versions of Ruby on Windows, similar to RVM.
  • Databases - Neither SQLite, MySQL, or PostgreSQL are installed on Windows to start. Download SQLite, MySQL, PostgreSQL and make sure to install their gems as well.
  • Whatever Wayne is up to ...

IDEs

The debate surrounding which IDE is best could go on for days. Instead of stating which one is ideal, here is a list of IDEs that will allow you to develop Ruby on Windows. The choice is yours.

Tutorials

  • Installing Ruby - The RubyInstaller team has also provided a collection of tutorials from users who have setup a Ruby environment on Windows. Many of these include common issues experienced during the installation process, as well as the steps for setting up Git, MySQL, SQLite3, etc.
  • Setting Up Git - GitHub has a set of instructions outlining how to setup Git on Windows.
  • Rails Tutorials - Check out the Rails Installation (Windows) video as well as other great resources for learning Rails.
  • Finally, join the RubyInstaller Google Group for any additional questions.
For any current Ruby Windows users, please let us know what issues you've experienced and let us know of any tools we may have missed that you've found beneficial.


more »

Getting Setup for Ruby on Rails Development »

Created at: 01.12.2010 21:30, source: Engine Yard Blog, tagged: Technology tips development linux mac rails ruby setup tutorial windows

The Resources for Getting Started With Ruby on Rails seemed to be useful for a lot of people. However, it was a post geared for people who had already setup their computers for development work. So I created a tutorial for those of you who haven't yet set up your computers for Ruby on Rails development. Just go to the Engine Yard Documentation Area, in the tutorials section. There you'll find instructions for setting up your computer, basic git commands, and a step-by-step tutorial on creating an application with Rails 3 and Bundler. Each section is designed to be useful by itself, so if you just want to learn more about Bundler or Rails 3 you can. If you have any feedback on how to improve the tutorials let me know in the comments section. Also, if you want to take a hands-on training course on how to develop a Rails application, you might want to attend the Zero to Rails 3 class which is happening (online) December 20-23.

Check out this Spanish translation of the Getting Set Up for Ruby on Rails Development tutorial documentation, courtesy of Mario Alberto Chávez Cárdenas of Decisiones Inteligentes and Tiajuana.rb. Many thanks Mario!


more »

Community Highlights: IronRuby »

Created at: 11.08.2009 19:19, source: Riding Rails - home, tagged: Activism .NET ironruby microsoft windows

<style type="text/css" media="screen,projection"> div.itv-question{padding-bottom: 1em; color: #555; font-size: italic} div.itv-question span.matt-aimonetti{color:#336699; background-color:#F4DDA6;} div.itv-answer{padding: 1em 1em 3em 1em;} div.itv-answer span.Jimmy{background-color:#F4DDA6; color:#336699; font-size: italic}

</style>

As Rubyists migrate from Ruby 1.8 to Ruby 1.9, new Ruby implementations are gaining in maturity. Recently, IBM's Antonio Cangiano wrote an interesting article comparing the performance between Ruby 1.8, 1.9 and IronRuby on Windows which surprised quite a lot of people.

Unfortunately, IronRuby isn't very well known in the Rails community yet.

Here is an interview with Jimmy Schementi, lead developer for IronRuby, to help give you a little insight.

iron ruby logo

Matt: Hi Jimmy, thank you very much for taking the time to answer our questions. Could you please introduce yourself?
Jimmy: Thanks for sending me questions; it's great to see the ever-increasing interest in IronRuby! I live in Seattle and work at Microsoft on a small team making an open-source implementation of Ruby called "IronRuby". I personally split my efforts between making the IronRuby codebase better, integrating IronRuby with .NET-related technologies like Silverlight or ASP.NET MVC, getting our monthly binary releases are in order, discussing IronRuby with the community, and making sure Microsoft's management knows how awesome Ruby is. But I'm definitely not alone on the core team. John Lam fueled the interest of a .NET-Ruby implementation with the RubyCLR project, and started the IronRuby project. Tomas Matousek is the brains behind the IronRuby compiler, and gets credit for all the compiler code and the recent performance gains. Jim Deville is the man keeping IronRuby working with tons of tests and a fantastic test infrastructure. Shri Borde is our manager, and he spends his non-managing time fixing the libraries and hosting the infamous "IronRuby pair-programming" sessions. And of course all the IronRuby contributors over the past two years have been an enormous help.
Matt: As a follow up on a recent blog post, could you tell us know how you learned Ruby and maybe give some advice or an important point not to miss for people wanting to learn Ruby?
Jimmy: I heard about Ruby from my Computer Science professor/advisor Gary Pollice, who taught all the programming language classes at Worcester Polytechnic Institute. I was searching for an expressive programming language for making games, and Ruby was a perfect fit. A couple years later I worked for the same university building a computer-tutoring system called Assistment, where myself and a couple of other people fed up with the Java codebase ported it to Ruby on Rails. It was a success, and http://assistment.org is now a Rails system. That's where I really learned everything about Ruby and became extremely interested in how Ruby worked. I learned the most from Ruby when I had a substantial Ruby project to work on, since I got to see its expressiveness making me more productive on a large scale. I'd still suggest trying to learn Ruby on small things here and there, but you'll really be amazed if you use it for something larger.
Matt: IronRuby certainly looks very interesting, can you run Rails on it?
Jimmy: Yes, at RailsConf 2009 I showed IronRuby running non-trivial Rails applications. IronRuby can run Rails on WEBrick, as well as on the web-server that comes with Windows, IIS. For the database you can use SQLServer Express (which is free), or any .NET based database, like the recent csharp-sqlite port. Here's a detailed post the IronRuby on Rails talk at RailsConf 2009: http://blog.jimmy.schementi.com/2009/05/ironruby-at-railsconf-2009.html.
Matt: Are there any limitations that our readers should be aware of before starting to develop on IronRuby?
Jimmy: The main limitation is that IronRuby does not support any of the C-based Ruby libraries, and only after 1.0 will we consider building an interop layer between the Ruby C API and IronRuby. In the meantime, people have been porting their favorite C-based Ruby libraries over to C# so it can be used from IronRuby, like Hpricot. While this seems like a large limitation, most of the C-based libraries Ruby code depends on have an equivalent API in the .NET framework, which IronRuby has direct integration with, making either using directly or porting really easy. For example, the Rails app I showed at RailsConf did image resizing directly with the System.Windows.Drawing APIs rather than ImageMagick. If your code does not depend on anything outside of the Ruby standard library that is C-based, you should have no problems. Take a look at the documentation for running Rails on IronRuby to make sure things go smoothly: http://ironruby.net/Documentation/Rails.
Matt: What are the pros/cons of using IronRuby versus the standard Ruby (Ruby1.8 or Ruby1.9) on Windows?
Jimmy: IronRuby is a very fast Ruby interpreter/compiler due to our own tricks we pull to make Ruby fast, the tricks the DLR does to make dynamic languages fast, and the CLR's just-in-time compiler which generates very efficient code. We're definitely aiming to be the fastest Ruby implementation on Windows. The most recent performance work we did was only in the core libraries ("Array", "Hash", etc), and that helped IronRuby surpass Ruby 1.8.6 on Windows and gets much closer to Ruby 1.9.1. IronRuby is continuing to investigate ways of gaining performance in each release. IronRuby is also a very 1.8.6 compliant Ruby implementation. There is a "-19" flag for any 1.9 specific features you might need, and a "-20" flag for any Ruby 2.0 features we might have in there, but there are no guarantees on those; we only test the 1.8.6 behavior today. We pass ~85% of the RubySpec test suite, the best test suite for Ruby implementations to verify their correctness. However, the numbers I'm more concerned with are whether specific Ruby libraries' test-suites work. We pass Rails, RubyGems, Rake, and RSpec's test suites at well over 90%, and fix compatibility issues when asked about them, so please let us know if your applications run into any compatibility problems. Other than the limitations that I mentioned in the previous question, you should have no problems. I love people to try running their Rails applications on the latest IronRuby bits hosted on GitHub, and please report any issues you find on http://ironruby.codeplex.com.
Matt: Are they any extra advantages to use IronRuby?
Jimmy: The most notable advantage is that IronRuby works in Silverlight, a subset of the .NET framework which installs as a browser plugin in Mozilla-based browsers (eg. Firefox on Mac and Windows), Webkit-based browsers (eg. Safari on Windows), and IE (on Windows, duh). The Mono project is implementing an open-source version of Silverlight called "Moonlight" so Linux developers can run Silverlight applications, which I talked about at OSCON 2009. This enables you to write Ruby in the browser instead of JavaScript, for controlling HTML or vector graphics. The best place for documentation/examples today is on the Gestalt website, a little portal designed to bring awareness to Ruby and Python in Silverlight: http://visitmix.com/labs/gestalt. The IronRuby website is in flux at the moment, but clearer documentation is on its way. I also built a little Ruby on Rails plugin called "Silverline" to make it really easy to use Silverlight from Rails. Worth checking out if you want to use Ruby as a client scripting language. IronRuby has direct integration with the .NET framework, so anything that is in, or run on, the .NET framework can be used directly from IronRuby. .NET namespaces are exposed as Ruby modules, .NET classes as Ruby classes, and you can call methods on them just like you call Ruby methods. This makes it really easy to build pieces of your system in a static language (if it makes sense to use, like for a high-performance message queue, game engine, etc) and then interact with it through Ruby.
Matt: Why is Microsoft interested in a Ruby project? What advantage do they find in sponsoring such a project?
Jimmy: I see it as a "you scratch my back, I'll scratch yours" situation. Microsoft sponsoring IronRuby helps the Ruby community by making Ruby a first-class language on Windows and .NET, also giving the .NET crowd the choice of using Ruby, and in return the IronRuby project helps promote innovation in the languages that drive Visual Studio purchases (C#, VB.NET, and F#). As a kind-of related side-note: some people feel it's a bad thing that there are so many implementations of Ruby, kind of like MRI is so bad that others had to fix it, but I completely disagree. IronRuby, JRuby, MacRuby, and most of the other implementations accomplish the same thing for their respective communities; building a bridge between Ruby developers and themselves. Rather than needing to recreate MRI, most have been inspired by it and wanted to bring the language to their platform. It's a great thing for the Ruby community because it gives access to more platforms, operating systems, and libraries than any other language. Anyway, back to the question: as an example of how IronRuby has helped language innovation, the next version of C# will now have a "dynamic" keyword, indicating that the variable statically-typed as "dynamic" (=P) should perform dynamic dispatch on any method calls, rather than verify the method call at compile-time. This infrastructure uses the Dynamic Language Runtime directly, so C# can use Ruby objects just like they were defined in C#, or any other dynamic-enabled object.
Matt: How will IronRuby make Rails developer lives easier and what are the plans for the future of IronRuby?
Jimmy: My hope is that IronRuby can benefit existing Rails developers by making Windows a great option to develop and deploy on. By building a Rack adapter specifically for IronRuby and IIS (like I showed at RailsConf), Rails applications can tie directly into the same web-server pipeline that ASP.NET does, significantly reducing the overhead deploying via IIS+FCGI gives you today. This makes deploying Rails applications on IIS just like deploying ASP.NET apps, so system administrators don't have to learn a whole new framework; to them it's just ASP.NET. Then any existing ASP.NET shops who want to offer Rails applications to their customers can, with the same infrastructure and deployment know-how. This is bringing choice to the technologies you choose to deploy on Windows, just like how Microsoft has helped make PHP run well on IIS. The only definite future plans for IronRuby is continue pushing on performance on compatibility, as well as continue supporting the latest version of Silverlight and Mono. 1.0 will be released when the community is happy with the state of those metrics, and future work should be driven by what IronRuby users want. If you start using IronRuby and want a feature either by 1.0 or post 1.0, please post the request to the mailing list or to CodePlex. We have tons of hopes and dreams for what IronRuby can do in the future, so please come help out!
Matt: Is there anything you would like to add or share with the readers?
Jimmy: Thanks to Matt for the interview, and thanks to the readers for getting this far! Go grab the 0.9 release from http://ironruby.net/download, or the latest source from http://github.com/ironruby/ironruby, tell us if you have any problems with it, and we hope you'll help IronRuby get to a 1.0 release.


more »