Mephisto Google Sitemaps Plugin
August 16th, 2007
Since I recently restructured my site I wanted to make changes quickly visible to Google. Sitemaps can help with this. I searched for Mephisto plugin. Found Sitemap Generator by Joseph Moore and Auto Generated Sitemaps by Greg Benedict.
Both were great but required manually editing Rails routes. They also did not use Mephistos plugin facilities which enable configuring through admin interface.
Based from two previous examples Mephisto Sitemap was born. Installing is as simple as:
script/plugin install
http://svn.appelsiini.net/svn/rails/plugins/mephisto_sitemap/
Restart you WEBrick or mongrel and youre set to go. Routes are automatically added to poing to your <mephisto_root>/sitemap.xml.
Now sit back and wait for you increased Google fame!
August 29th, 2007 at 08:01 PM
I just installed mephisto_sitemap in my mephisto blog. Unfortunately whenever I try to request /sitemap.xml I get this error:
NoMethodError in SitemapController#index
undefined method `is_missing?’ for #<loaderror:0x34934c0>
vendor/rails/actionpack/lib/action_controller/helpers.rb:130:in `default_helper_module!’ vendor/rails/actionpack/lib/action_controller/helpers.rb:143:in `send’ vendor/rails/actionpack/lib/action_controller/helpers.rb:143:in `inherited_without_api’ /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/container/action_controller_container.rb:84:in `inherited_without_action_controller’ /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:32:in `inherited’ app/controllers/application.rb:10:in `inherited’
I am running mephisto edge and rails edge.
August 30th, 2007 at 04:37 PM
I am running 1.2.1 and 1.2.3 Rails and Mephisto edge. Might be related to edge Rails. Will do a test setup with edge Rails and investigate.
August 31st, 2007 at 11:19 AM
Could you reinstall and test. Patch was kindly provided by Sean O’Brien.
Problem was that helper file did not define SitemapHelper module. This caused edge Rails to throw exception.
October 23rd, 2007 at 12:56 AM
Hello,
Just got your plugin working with edge rails on edge mephisto (i.e. rails 2.0).
Couple things: 1) lib/sitemap_controller has a depricated refrence to template_root (which rails 2 replaces with view_paths. So changing line 2 to self.view_paths = File.join(File.dirname(FILE),’../’, ‘views’) fixes the problem for rails edge.
2) Could get the auto route to work. Adding a manual route to lib/mephisto/routing worked and I didn’t investigate further.
October 25th, 2007 at 03:47 PM
Face, thanks! Seems I have some debugging to do with edge rails…
January 12th, 2008 at 10:37 PM
Can you give me the exact fix for part 2 above? I’m a bit of a newbie with mephisto… Thanks!
January 30th, 2008 at 05:11 AM
Hi Mika,
I want to say thank you for your plugin. I’m using it with Mephisto trunk and Rails 2.0.2: it works great.
thanks!
—Thibaut
February 5th, 2008 at 04:21 PM
face & john: I committed the fixes. Everything now works out of the box with Rails 2.0.2 and Mephisto 0.8. This includes automatic adding of route.
Thibaut: Thanks! You might want to upgrade too. Latest version silences some warnings which were logged.