Posts belonging to Category Ruby
Posted by codethought on January 27, 2010
I’m sure you’ve probably seen this question in your programming classes.. I decided I wanted to play with Ruby again and was remind of this problem, so thought it might be fun as a simple exercise to do this in Ruby.
The problem is to take a long integer and convert it to hours, minutes and [...]
Categories: Programming, Rails, Ruby |
Tags: Programming, Rails, Ruby |
No Comments »
Posted by codethought on January 27, 2010
While I was getting some old Ruby code of mine out to convert ruby code to pretty HTML-formatted code suitable for blogging from Wolfman’s Howlings I got the following error:
$ ./ruby2html.rb
./ruby2html.rb: line 9: require: command not found
./ruby2html.rb: line 10: require: command not found
./ruby2html.rb: line 11: require: command not found
./ruby2html.rb: line 14: syntax error near [...]
Categories: Programming, Ruby |
Tags: os x, Ruby |
No Comments »
Posted by codethought on July 22, 2008
While I was playing with Rails 2.1 I decided to try the SQLite3 support that comes built into OS X instead of using MySQL. Upon trying to run a migrate command via rake I was created with:
rake aborted!
no such file to load — sqlite3/database
After some digging around I found out that (for at least [...]
Categories: Mac OS X, Programming, Rails, Ruby |
No Comments »
Posted by codethought on February 13, 2008
I don’t know why this isn’t better documented or stated anywhere so I’ll just iterate it here. If you want to peruse the documentation for Rails and your installed Gems type the following
gem server
And in your terminal prompt you should see
Starting gem server on http://localhost:8808/
And you should be set.
Categories: Rails, Ruby |
No Comments »
Posted by codethought on January 4, 2008
Mongrel Developer/Creator, Zed Shaw, cut loose on the Ruby and Rails communities in a recent posting to his website. He gives some interesting insights into who the major players are, and cuts through some of the hype surrounding rails.
While caustic in his delivery, he makes excellent points about the industry in general. If you’re [...]
Categories: J2EE, Java, Rails, Ruby |
No Comments »
Posted by codethought on November 28, 2007
Most people when they get into developing for Ruby on Rails on OS X probably use this handy guide to install the latest Ruby and Rails on OS X
http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx
If you build Ruby on your Leopard installation to use the latest and greatest ruby-1.8.6-p111 release following that guide you’ll probably be greeted with something like this [...]
Categories: Mac OS X, Ruby |
No Comments »
Posted by codethought on October 20, 2007
My friend Lori noted a great way to Add to the Ruby Library Path. She also noted that I had no way to put comments on my blog. Users would get sent to a page telling them to log in, but I never provided the login link
Fixed — check out the “Links” section [...]
Categories: Programming, Ruby |
1 Comment »
Posted by codethought on October 20, 2007
In Ruby not library management is not always as simple as running gem install.
Some Ruby code is distributed simply as libraries. So where do you put these libraries? The clue is
in the Ruby $LOAD_PATH variable.
irb(main):001:0> puts $LOAD_PATH
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/i686-darwin8.10.1
.
=> nil
irb(main):002:0>
This tells you that you can put your library code in any of the [...]
Categories: Programming, Ruby |
No Comments »
Posted by codethought on October 9, 2007
I just saw on the Codegear Ruby newsgroups that a vulnerability on the net/https
library was reported. Basically the library doesn’t validate the server certificate
CN (Common Name).
You can read the details here:
http://www.isecpartners.com/advisories/2007-006-rubyssl.txt
Patches have been done for Ruby to accommodate this and you can download them from here:
http://www.ruby-lang.org/en/news/2007/10/04/net-https-vulnerability/
Categories: Programming, Ruby |
No Comments »
Posted by codethought on September 23, 2007
I saw this article on formatting ruby code for blogs. Nice article, but the code is Linux/KDE-specific. Also, OS X threw an error about the order of the require statements. Being that I use OS X (and so should you) I needed to make a couple of changes to the code that [...]
Categories: Mac OS X, Ruby |
No Comments »