Re: [Radiant] Can't install radiant

2008-06-25 Thread Josh French
On Jun 25, 2008, at 3:12 PM, Sean Cribbs wrote: With the other recent problem related to bootstrapping, I'm considering adding a method: Radiant.bootstrapped? I'm wondering if this behavior shouldn't belong to the extension base class. Just yesterday I was wishing for a way to make an extens

Re: [Radiant] radiant-settings error on mysql 5.0.27

2008-06-25 Thread Alex Wayne
Yes, I noticed that on one of my projects when I pushed it to the server. Not patch yet. I think this is a bug in the rails MySQL adapter for not treating "key" as a reserved word. I think. -Alex http://beautifulpixel.com On Jun 25, 2008, at 12:08 PM, Jim Gay wrote: I'm trying to use the

Re: [Radiant] Writing an radius tag extension article - running specs

2008-06-25 Thread Marty Haught
On Wed, Jun 25, 2008 at 2:26 PM, Chris Parrish <[EMAIL PROTECTED]> wrote: > Use "rake spec:extensions EXT=your_extension_name" to just run the specs for > your extension. It had the same results: http://pastie.org/222128 > By the way, does anyone else think it would be useful to run specific >

Re: [Radiant] Writing an radius tag extension article - running specs

2008-06-25 Thread Chris Parrish
Alex Wayne wrote: Thats quite odd. Are you sure you are running the latest rspec gem? Try a gem install rspec -Alex http://beautifulpixel.com I've had troubles using the rSpec gem because Radiant ships with its own version of rSpec and rSpec on Rails. Whenever I tried to use the gem, rS

Re: [Radiant] Writing an radius tag extension article - running specs

2008-06-25 Thread Alex Wayne
Acording to http://rspec.rubyforge.org/rdoc/classes/Spec/Rake/SpecTask.html you can do that rake spec SPEC=path/to/file_spec.rb It works like a charm. -Alex http://beautifulpixel.com On Jun 25, 2008, at 1:26 PM, Chris Parrish wrote: Use "rake spec:extensions EXT=your_extension_name" to jus

Re: [Radiant] Writing an radius tag extension article - running specs

2008-06-25 Thread Chris Parrish
Chris Parrish wrote: Use "rake spec:extensions EXT=your_extension_name" to just run the specs for your extension. Oh, and you run it from the project's root - not the extension's. -Chris ___ Radiant mailing list Post: Radiant@radiantcms.org Search

Re: [Radiant] Writing an radius tag extension article - running specs

2008-06-25 Thread Alex Wayne
Thats quite odd. Are you sure you are running the latest rspec gem? Try a gem install rspec -Alex http://beautifulpixel.com On Jun 25, 2008, at 12:24 PM, Marty Haught wrote: On Tue, Jun 24, 2008 at 9:15 PM, Alex Wayne <[EMAIL PROTECTED]> wrote: Radiant 0.6.7 generates extensions with a

Re: [Radiant] Writing an radius tag extension article - running specs

2008-06-25 Thread Chris Parrish
Use "rake spec:extensions EXT=your_extension_name" to just run the specs for your extension. By the way, does anyone else think it would be useful to run specific spec(s) within an extension? Perhaps using syntax like: rake spec:extensions EXT=your_extension_name FILE=app/controllers/my_c

Re: [Radiant] Can't install radiant

2008-06-25 Thread Jim Gay
I don't know enough about the extension loading code to provide insight, but Radiant.bootstrapped? seems like a good idea to me. -Jim On Jun 25, 2008, at 3:12 PM, Sean Cribbs wrote: With the other recent problem related to bootstrapping, I'm considering adding a method: Radiant.bootstrapped?

[Radiant] Writing an radius tag extension article - running specs

2008-06-25 Thread Marty Haught
On Tue, Jun 24, 2008 at 9:15 PM, Alex Wayne <[EMAIL PROTECTED]> wrote: > Radiant 0.6.7 generates extensions with a spec directory by default, and no > test directory at all. Its all hooked up already for ya. Hi Alex, Yes, I see that but I've run into problems just getting them to run. So I have a

Re: [Radiant] Can't install radiant

2008-06-25 Thread Sean Cribbs
With the other recent problem related to bootstrapping, I'm considering adding a method: Radiant.bootstrapped? Thoughts? Sean Josh French wrote: The issue lies in Radiant's extension loader, and affects any extension attempting to set config variables. I'm not sure the onus is on the extensi

[Radiant] radiant-settings error on mysql 5.0.27

2008-06-25 Thread Jim Gay
I'm trying to use the radiant-settings extension and having a problem in MySQL 5.0.27: ActiveRecord::StatementInvalid (Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key' at line 1: SELECT

Re: [Radiant] Can't install radiant

2008-06-25 Thread Josh French
The issue lies in Radiant's extension loader, and affects any extension attempting to set config variables. I'm not sure the onus is on the extension developer to catch an un-initialized environment. Perhaps the upcoming extension registry's local interface should be aware of the state of t

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alex Wayne
Maybe config['foo'] should just return nil if no config table exists? Or radiant maybe shouldn't load plugins at all if the project has no database yet? -Alex http://beautifulpixel.com On Jun 25, 2008, at 11:11 AM, Jim Gay wrote: What would be the way to fix this for extension developers?

Re: [Radiant] Summer doc project - Writing an radius tag extension article

2008-06-25 Thread Marty Haught
I think it all matters based on your context. I do agree that I would follow Sean's approach first. For example, Alex, I might do this: You can scope your radius tags so you don't have to repeat the box part. I'm not 100% on how name collisions happen but I'm sure Sean

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alex Wayne
That's kind of a poor solution in general. Say you commit your radiant to git, and deploy via capistrano, extensions included. It would suck to uninstall those on the webserver. The better solution is that extension should be written so that they don't break bootstrapping. -Alex http://

Re: [Radiant] Can't install radiant

2008-06-25 Thread Jim Gay
What would be the way to fix this for extension developers? On Jun 25, 2008, at 1:59 PM, Alex Wayne wrote: You should be able to install it now without a problem. That extension, apparently, depends on some database table being present when your radiant instance boots up. Running rake db:b

Re: [Radiant] Can't install radiant

2008-06-25 Thread Mohit Sindhwani
Alex Wayne wrote: Just remove the "gallery" folder from "vendor/extensions", get yourself up and running just as you were trying to do before (rake db:bootstrap), and then put the gallery extension back where it was. -Alex http://beautifulpixel.com Alex, should this be added to the wiki? A

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alex Wayne
You should be able to install it now without a problem. That extension, apparently, depends on some database table being present when your radiant instance boots up. Running rake db:bootstrap boots up your radiant, but if those tables aren't there yet, and that extension doesn't handle th

Re: [Radiant] Summer doc project - Writing an radius tag extension article

2008-06-25 Thread Andrew O'Brien
I see your point Sean, and I think I realized that about halfway through writing the extension. :) As Alex points out, the problem is not being able to pass data in with snippets. I've solved this in other places using the Data Pages extension (due to the fact that the data context from the page

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alex Wayne
Just remove the "gallery" folder from "vendor/extensions", get yourself up and running just as you were trying to do before (rake db:bootstrap), and then put the gallery extension back where it was. -Alex http://beautifulpixel.com On Jun 25, 2008, at 10:38 AM, Alfredo Perez wrote: Sorry I

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alfredo Perez
I deleted the gallery folder extension and now it works. However, I would like to install gallery extension, can I do that now? Alex, why was the gallery extension causing the problem? Alfredo On Wed, Jun 25, 2008 at 10:31:22AM -0700, Alex Wayne wrote: > > /usr/lib/ruby/gems/1.8/gems/radiant-0

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alfredo Perez
Sorry I am a big time newbie How do I do that? Thanks Alex Alfredo On Wed, Jun 25, 2008 at 10:31:22AM -0700, Alex Wayne wrote: > > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/extensions/gallery/ > app/models/gallery_item.rb:16 > > There's your problem. Try removing that extension, boot

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alex Wayne
> /usr/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/extensions/gallery/ app/models/gallery_item.rb:16 There's your problem. Try removing that extension, bootstrapping, then putting it back in. -Alex http://beautifulpixel.com On Jun 25, 2008, at 10:01 AM, Alfredo Perez wrote: /usr/lib/ruby/

Re: [Radiant] Summer doc project - Writing an radius tag extension article

2008-06-25 Thread Alex Wayne
Learn new things everyday. Do you have a brief example of that? One of the reasons I have written some custom tags such as this is because there is no way to pass arguments to snippets. So if I understood you right, I can have a snippet: Then I define my tag

Re: [Radiant] Odd Behavior During Testing

2008-06-25 Thread Chris Parrish
Only tests (specs, actually). Alex Wayne wrote: Does the site work ok when you boot the server? Or is it only tests that are broken? -Alex http://beautifulpixel.com On Jun 25, 2008, at 7:28 AM, Chris Parrish wrote: Anyone? Further testing shows that when I don't include my module, I can

Re: [Radiant] Can't install radiant

2008-06-25 Thread Mohit Sindhwani
Alfredo Perez wrote: On Wed, Jun 25, 2008 at 11:29:40AM -0500, Sean Cribbs wrote: Alfredo, Which version are you using? Sean Alfredo Perez wrote: Hi, I have followed the steps mentioned at the radiant site. 1.- Created a project, radiant --database mysql my_project 2.- Created a mys

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alfredo Perez
Here it is with --trace: (in /usr/lib/ruby/gems/1.8/gems/radiant-0.6.7/photos) ** Invoke production (first_time) ** Execute production ** Invoke environment (first_time) ** Execute environment rake aborted! Mysql::Error: #42S02Table 'my_project.config' doesn't exist: SHOW FIELDS FROM `config` /u

Re: [Radiant] Can't install radiant

2008-06-25 Thread Alfredo Perez
On Wed, Jun 25, 2008 at 11:29:40AM -0500, Sean Cribbs wrote: > Alfredo, > > Which version are you using? > > Sean > > Alfredo Perez wrote: >> Hi, I have followed the steps mentioned at the radiant site. >> >> 1.- Created a project, radiant --database mysql my_project >> 2.- Created a mysql database

Re: [Radiant] Summer doc project - Writing an radius tag extension article

2008-06-25 Thread Sean Cribbs
I realize this problem may be for a specific project, so take my commentary with a grain of salt. It has always been my intention (and John's too) to keep any markup out of Radius tags, and it usually ends up simplifying testing them. Markup in a tag definition is a bad code smell to me (use a

Re: [Radiant] Can't install radiant

2008-06-25 Thread Sean Cribbs
Also, can you run `rake production db:bootstrap --trace` and put the output in a pastie? (http://pastie.org) Sean Alfredo Perez wrote: Hi, I have followed the steps mentioned at the radiant site. 1.- Created a project, radiant --database mysql my_project 2.- Created a mysql database "my_proje

Re: [Radiant] Can't install radiant

2008-06-25 Thread Sean Cribbs
Alfredo, Which version are you using? Sean Alfredo Perez wrote: Hi, I have followed the steps mentioned at the radiant site. 1.- Created a project, radiant --database mysql my_project 2.- Created a mysql database "my_project" 3.- cd into my_project directory 4.- created a databases.yml in ../

Re: [Radiant] Can't install radiant

2008-06-25 Thread Mohit Sindhwani
Alfredo Perez wrote: Hi, I have followed the steps mentioned at the radiant site. 1.- Created a project, radiant --database mysql my_project 2.- Created a mysql database "my_project" 3.- cd into my_project directory 4.- created a databases.yml in ../my_project/config here is the content of that

Re: [Radiant] Summer doc project - Writing an radius tag extension article

2008-06-25 Thread Alex Wayne
But the provided matcher that does page.should render(tag).as(expected) is so handy! But you are definitely right. White space issues especially make this a bit cumbersome. Perhaps that matcher needs to be expanded. What if you could do this: page.should render(tag).with_tag('h1',

[Radiant] Can't install radiant

2008-06-25 Thread Alfredo Perez
Hi, I have followed the steps mentioned at the radiant site. 1.- Created a project, radiant --database mysql my_project 2.- Created a mysql database "my_project" 3.- cd into my_project directory 4.- created a databases.yml in ../my_project/config here is the content of that file production: ad

Re: [Radiant] Odd Behavior During Testing

2008-06-25 Thread Alex Wayne
Does the site work ok when you boot the server? Or is it only tests that are broken? -Alex http://beautifulpixel.com On Jun 25, 2008, at 7:28 AM, Chris Parrish wrote: Anyone? Further testing shows that when I don't include my module, I can verify during any controller's spec that: con

Re: [Radiant] Haml in Radius tags

2008-06-25 Thread Sean Cribbs
Aslak, That's pretty cool. IIRC the 'backdoor' extension allows you to use ERb in your Radius code, but other than that I haven't heard of people using it. Sean aslak hellesoy wrote: Has anyone tried to use Haml for custom tags? I just tried it out and it works fine: http://pastie.org/22190

[Radiant] Haml in Radius tags

2008-06-25 Thread aslak hellesoy
Has anyone tried to use Haml for custom tags? I just tried it out and it works fine: http://pastie.org/221900 Is anyone else doing this? Aslak ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Sit

Re: [Radiant] Summer doc project - Writing an radius tag extension article

2008-06-25 Thread Andrew O'Brien
Nice work! One thing I'd add to your spec section (and I'll let you decide how you want to integrate this into the article) is to use "should have_tag" instead of string comparison. The main disadvantage I've found with strings is that it's hard to track down individual characters sometimes (espe

Re: [Radiant] Odd Behavior During Testing

2008-06-25 Thread Chris Parrish
Anyone? Further testing shows that when I don't include my module, I can verify during any controller's spec that: controllers_where_no_login_required = [SiteController] As soon as I mix it in (even though it's an empty module), during the environment init and just before specs start to ru