6 posts tagged “ruby”
I just found this library. Its design is based on the well-known Boost library.
To install:
sudo gem install rgl
After updating the metadata on 150+ gems (that I don't care anything about):
Successfully installed stream-0.5
Successfully installed rgl-0.2.3
2 gems installed
Installing ri documentation for stream-0.5...
Installing ri documentation for rgl-0.2.3...RDoc failure in lib/rgl/rdot.rb at or around line 59 column 0
Before reporting this, could you check that the file
you're documenting compiles cleanly--RDoc is not a
full Ruby parser, and gets confused easily if fed
invalid programs.The internal error was:
ERROR: While executing gem ... (ArgumentError)
invalid mbstring sequence
After installing Rails (Edge) on OS X, I started getting various errors about 'sqlite3'. So, I decided to do a little research.
It turns out that SQLite3 is the new default (development) database for Rails and is also pre-installed on OS X (>Tiger).
When I tried to install the Ruby bindings, I received:
I found a post that described a fix:
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby
Of course, this means I have to install apt-get, except that on OS X we use MacPorts.
I don't need sqlite3, so can exclude it.
Well, that didn't work. Apparently, there is no such thing as "libsqlite3-dev" through ports.
I found another post that suggests getting the SQLite3 source code.
Installing Rails is supposed to be easy. (This isn't in the instructions of the video, but I assume I need to actually install Rails at some point!)
sudo gem install rails --include-dependencies --no-rdoc
(I used '--no-rdoc' proactively.)
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
6 gems installed
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Despite the '--no-rdoc', it seems to have installed the documentation. Oh well, no errors.
Ah, but I am running Ruby 1.9 which is not compatible with Rails 2.0.2. Ugh.
Using the latest Rails, Rails worked! (Welcome to life on the Edge.)
I had cause today to look into Rails VPS hosting services. I came across the Nuby on Rails article with a ton of comments which serve to validate and clarify various points. More searching turned up similar reviews. There is even a Rails-specific hosting info site.
Slicehost appears to be the best choice for my needs (a small, mainly static Rails app). The minimum plan is $20/mo for 256MB RAM, 10GB space, 100GB bandwidth. This is all way more than I actually need.
I'm trying to understand the hosting options before I get going on my development effort. I'd like for my dev setup to be as close as possible to my deployed/hosted setup. I'll be using VMWare on my MacBook Pro for this purpose. (I'm not going to be fussing with IronRuby for this project.)
Ruby is now an official part of Leopard. Well, it seems more complicated than that. It seems that there are difficulties updating the gems, since the gem system installed by default in Leopard is 0.94 (gem -v) and gems isn't Leopard-aware until 0.95. It is now at 1.0. Lots of workarounds have been suggested.
I'm not going to bother with all that right now. The defaults should be sufficient for my immediate purposes.
I have a few small projects that I'd like to do and thought I'd try them in Ruby. And not just any Ruby, but IronRuby.
While this is an official MS project, it is being developed largely in the open. The mailing list is the primary communication vehicle.
I downloaded and installed the Turtoise SVN client for Windows. It wants to reboot; I deferred.
I downloaded and installed the One-Click Ruby Installer for Windows. It didn't want to reboot.
After rebooting (I updated my copy of VMWare Fusion in the meantime), I created a c:\IronRuby folder and used the context menu (right-click) to "SVN Checkout..." from svn://rubyforge.org/var/svn/ironruby
Lots of files flew by in the little window.
I launched VS 2008, performed a conversion of IronRuby.sln, and built and ran the console. To my surprise, everything worked just fine.
All-in-all, it went quite smoothly. Now, I'll start poking around the code... I can't wait for the next check-in from John Lam & co. with the debugging goodies.