Published in
GeoRSS, Maps, Programming, Rails, Ruby
The newer, more full-featured kid on the embedding Maps-in-your-Rails-App-block has gotten an update. YM4R v0.5.1 was released a couple of days ago. It’s now mostly a plugin, instead of a gem, since it includes a lot of Rails specific stuff. There are Ruby libraries for creating GoogleMaps tiles, and geocoding that are still in the gem, which is great too.
And I’ve even done my part to contribute by submitting my GeoRSS Simple Parser.
Technorati Tags: ym4r, plugin, rubyonrails, rails, ruby
Published in
Cartographer Plugin, Maps, Open-Source, Programming, Project, Rails, Ruby, Technology
I ran across GeoRuby, a Ruby gem for handling spatial data types in a database, awhile ago. However, I never sunk my teeth into how it worked and how to get it going.
In the meantime, I settled myself to using the adequate Cartographer Plugin to easily create Google Maps. I even went so far as to extend Cartographer to switch to Yahoo! maps and MapQuest Maps.
I just came across another mapping gem, YM4R (yellow maps for Ruby) which handles GoogleMaps v2 (there is a patch for Cartographer to do the same), and Yahoo! maps, local, and traffic. Wow!
Not only that, it’s by the same developer of GeoRuby, The Pochi Superstar Mega Show!.
Check out the very good, and complete Ym4r + GeoRuby + Spatial Adapter tutorial
Published in
Apple, Programming, Rails, Web
I’ve been rapidly prototyping and developing a lot of Ruby on Rails applications. I don’t want to run lots of WebBrick servers, or configure lighty. I’d rather just use apache for local development, which is much quicker and doesn’t involve ports, and explicitly running stand-alone servers.
The instructions below are the quick, and bare-bones steps needed to get a rails app up for development on a Mac OS X machine.
Create your rails application
$ rails ~/Projects/myapp
Edit your apache config file
You need to setup your apache to know how to handle the /myapp URL request. Put the following at the bottom of your httpd.conf file.
/etc/httpd/httpd.conf
FastCgiServer /Users/username/Projects/myapp/public/dispatch.fcgi
-idle-timeout 120 -initial-env RAILS_ENV=development -processes 1
Alias /myapp/ "/Users/username/Projects/myapp/public/"
Alias /myapp "/Users/username/Projects/myapp/public/"
<directory /Users/username/Projects/myapp/public/>
Options ExecCGI FollowSymLinks
AllowOverride all
Order allow, deny
Allow from all
</directory>
Restart Apache
After you’ve edited the file, you need to restart apache:
$ sudo apachectl graceful
Set the rails base address
Now you need to let rails know what the base address is for the URL’s:
~/Projects/myapp/public/.htaccess
RewriteBase /myapp
Test that it works
Navigate your browser to http://localhost/myapp, and you should see the happy Welcome aboard
Published in
Open-Source, Programming, Rails, Ruby, Technology
A word to the wise of rails developers. Hopefully this makes it to Google search, because when I looked it up, there wasn’t an answer.
If you’re configuring ActionMailer and you try to run the console and get the following messages:
[host]$ script/console
Loading development environment.
./script/../config/../config/environment.rb:41:NameError:
uninitialized constant ActionMailer
/home/highearth/.gems/gems/actionpack-1.12.1/lib/action_controller/integration.rb:15:
NameError: uninitialized constant ActionController::Integration::Session::Test
./script/../config/../config/../app/controllers/application.rb:3:
NameError: uninitialized constant ActionController::Base
Make sure your ActionMailer configuration in your config/environment.rb file is after your Rails::Initializer.run do |config| block.