At first I thought that my Radiant install was too old (I gem
installed). Although, my sysadmin set up a shiny new virtual machine
with the latested Radiant 0.9.0 rc3 but there are still problems. :( I
followed the instructions on the wiki here:
http://wiki.github.com/radiant/radiant/adding-custom-radius-tags
These are the steps I followed:
[web...@cozmo cozmo-radiant]$ ./script/generate extension aoosdata
I edited the aoosdata_extension.rb file so that it looks like this:
# Uncomment this if you reference any of your controllers in activate
# require_dependency 'application_controller'
class AoosdataExtension < Radiant::Extension
version "1.0"
description "Custom tags to dispay AOOS text data from scp'd files."
url "http://yourwebsite.com/aoosdata"
# extension_config do |config|
# config.gem 'some-awesome-gem
# config.after_initialize do
# run_something
# end
# end
# See your config/routes.rb file in this extension to define custom
routes
def activate
Page.send :include, AoosDataTags
end
end
I then created the lib/AoosDataTags.rb file under the extension dir like so:
module AoosDataTags
include Radiant::Taggable
desc "Creates an HTML box with a title, icon and body content"
tag "box" do |tag|
""
end
end
I then restarted the service and tried to go to the site. Passenger
complains that there is a:
uninitialized constant AoosdataExtension::AoosDataTags
This is the same error I was getting before with the older version of
Radiant. :( Any help would be much appreciated and I can include the
full logs if needed. I don't remember having to anything else to get a
simple tags extension up and at least recognized by Radiant. I'm
probably missing something somewhere. :) Thanks,
Jason
john wrote:
On May 11, 6:35 pm, Jason Grimes <[email protected]> wrote:
Are the extensions in 0.9.0 still in flux? Is there anyway I could get
a simple example of a new extension if it is possible? I don't need
anything fancy and all I want to do is to just add some new tags to my
site.
if all you're doing is adding radius tags then i believe things behave
just like they always have. as far as a simple example try `script/
generate extension MyExtension`.