Re: [Radiant] Re: installing scoped_access plugin?

2011-02-15 Thread Fima Leshinsky
Hey Jim - it looks like there might be another bug w/ the
radiant-vhost-extension gem in that it uses, what appears to be, an
outdated add_site_columns.rb. I discovered it w/ Haselwanter's help
here: 
http://groups.google.com/group/radiantcms/browse_frm/thread/97d521029b003300

Let me know if I should open another issue for this?

Is the best practice to clone the repo from github as opposed to
installing the Gem if one wants to ensure that they're getting the
latest version of the repo?

Thanks!

On Tue, Feb 8, 2011 at 12:06 PM, Jim Gay  wrote:
> Would you mind opening up an issue for this?
>
> https://github.com/saturnflyer/radiant-vhost-extension/issues
>
> On Feb 8, 2011, at 14:54 , Fima Leshinsky wrote:
>
>> Hm .. I also had to set site_admin = true to be able to login to the backend:
>>
>> ree-1.8.7-2010.02 > user = User.find_by_login('admin')
>> ree-1.8.7-2010.02 > user.site_admin = true
>> ree-1.8.7-2010.02 > user.save!
>>
>> On Tue, Feb 8, 2011 at 11:34 AM, Fima Leshinsky  wrote:
>>> Oh wow .. figured it out :) Is this a bug w/ the gem/extension?
>>>
>>> So it looks like add_site_columns.rb is part of the gem:
>>> $ ls -lh 
>>> ~/.rvm/gems/ree-1.8.7-2010.02/gems/radiant-vhost-extension-2.3.1/lib/tasks/
>>> total 24
>>> -rwxr-xr-x  1 fimaleshinsky  staff   1.2K Feb  8 10:02 add_site_columns.rb
>>> -rwxr-xr-x  1 fimaleshinsky  staff   5.6K Feb  8 10:02
>>> vhost_extension_tasks.rake
>>>
>>> I copied it over to lib/tasks and the install rake task completed like
>>> a charm ..
>>> $ cp 
>>> ~/.rvm/gems/ree-1.8.7-2010.02/gems/radiant-vhost-extension-2.3.1/lib/tasks/add_site_columns.rb
>>> lib/tasks/
>>>
>>> $ rake production radiant:extensions:vhost:install --trace
>>> (in /Users/fimaleshinsky/Sites/heroku)
>>> ** Invoke production (first_time)
>>> ** Execute production
>>> ** Invoke environment (first_time)
>>> ** Execute environment
>>> ** Invoke radiant:extensions:vhost:install (first_time)
>>> ** Invoke environment
>>> ** Invoke radiant:extensions:vhost:migrate (first_time)
>>> ** Invoke environment
>>> ** Execute radiant:extensions:vhost:migrate
>>> ** Invoke radiant:extensions:vhost:apply_site_scoping (first_time)
>>> ** Invoke environment
>>> ** Execute radiant:extensions:vhost:apply_site_scoping
>>> ==  AddSiteColumns: migrating 
>>> =
>>> -- add_column("layouts", :site_id, :integer)
>>>   -> 0.0397s
>>> -- add_column("pages", :site_id, :integer)
>>>   -> 0.0047s
>>> -- add_column("snippets", :site_id, :integer)
>>>   -> 0.0055s
>>> -- add_index(:snippets, [:name, :site_id], {:unique=>true})
>>>   -> 0.0060s
>>> -- add_index(:snippets, [:name, :site_id])
>>>   -> 0.0007s
>>> ==  AddSiteColumns: migrated (0.0763s) 
>>> 
>>>
>>> ** Execute radiant:extensions:vhost:install
>>>
>>>
>>> On Tue, Feb 8, 2011 at 11:31 AM, Fima Leshinsky  wrote:
>>>> The only file I have in lib/tasks is vhost_extension_tasks.rake .. is
>>>> lib/tasks/add_site_columns supposed to be copied over during the
>>>> extension install?
>
>


Re: [Radiant] vhost extension configuration

2011-02-08 Thread Fima Leshinsky
Wow .. I stepped away for a bit .. reloaded the page and hit the "+
New Homepage" button again ... and ... it just worked .. wtf ..


Re: [Radiant] vhost extension configuration

2011-02-08 Thread Fima Leshinsky
Thanks Jim. Slowly but surely I'm figuring it out :)

I manually updated the Hostname.domain fields via the console and now
Radiant seems to be recognizing them! For some reason it doesn't like
any domain starting w/ www e.g. "www.domain.com". Instead I had to use
"domain.com" to match www.domain.com.

Also - when I try to add a new homepage to the brand-new site by
clicking the "+ New Homepage" button at the bottom of the Pages tab,
Radiant throws an error:

Processing Admin::PagesController#new (for 127.0.0.1 at 2011-02-08
22:26:26) [GET]
  Parameters: {"action"=>"new", "controller"=>"admin/pages"}

ActiveRecord::UnknownAttributeError (unknown attribute: site_id):
  vendor/radiant/app/controllers/admin/resource_controller.rb:144:in `new'

Any ideas? I'd be more than happy to write up a guide on how to
install + configure this vhost extension once I get it all working :P

Thanks again for your help!

On Tue, Feb 8, 2011 at 10:01 PM, Jim Gay  wrote:
>
> On Feb 9, 2011, at 0:33 , Fima Leshinsky wrote:
>
>> That seems very odd. How does Radiant know which site you're
>> requesting? In your examples, the browser wouldn't send an HTTP Host
>> header which is really the only way to differentiate between site A
>> and site B at the HTTP level.  Also localhost is just an entry in your
>> /etc/hosts file (assuming you're on a un*x-based system), which by
>> default is configured to resolve to 127.0.0.1. Since Radiant only sees
>> HTTP - both of those requests would appear identical to it.
>>
>> In my case - Radiant is serving up the default site regardless of what
>> Host header it sees.
>>
>> Do I need to make a change somewhere else to add new sites using the
>> vhost extension?
>>
>> Interesting that the Site model doesn't contain a hostname field.
>> Where is the hostname of each site specified?
>>
>> Site.find_each {|s| p s}
>> #"Default"}>
>> #"Effective Web Presence"}>
>
> Dig into the models.
>
> A site has_many :hostnames
> https://github.com/saturnflyer/radiant-vhost-extension/blob/master/app/models/site.rb
>
> Setup your sites with differing hostnames and then open different browser 
> windows and request them.
> This works just fine for me.
>
>
>>
>> Thanks again!
>>
>>> It depends on what you've setup.
>>>
>>> I'll often (in development) set one site to be "localhost" and another to 
>>> "0.0.0.0" and another to "127.0.0.1"
>>> All of those point back to your internal webserver and Radiant can answer 
>>> for 3 different sites.
>>>
>>> Does that help?
>>>
>>> -Jim
>
>


Re: [Radiant] vhost extension configuration

2011-02-08 Thread Fima Leshinsky
Well I'm a complete N00b to RoR so please bare w/ me but I just discovered this:

ree-1.8.7-2010.02 > ActiveRecord::Base.connection.tables
 => ["schema_migrations", "config", "extension_meta", "layouts",
"page_parts", "pages", "sessions", "snippets", "users", "sites_users",
"hostnames", "sites"]

Woohoo! So there are Hostname and Sites_user models!

ree-1.8.7-2010.02 > Hostname.find_each {|h| p h}
#
#
 => Hostname(id: integer, domain: string, port: string, site_id:
integer, created_at: datetime, updated_at: datetime)

For some reason I can't get to the Sites_user model though ..

ree-1.8.7-2010.02 > Sites_user.find_each {|u| p u}
NameError: uninitialized constant Sites_user

Now if only I knew where to go next :P


Re: [Radiant] vhost extension configuration

2011-02-08 Thread Fima Leshinsky
That seems very odd. How does Radiant know which site you're
requesting? In your examples, the browser wouldn't send an HTTP Host
header which is really the only way to differentiate between site A
and site B at the HTTP level.  Also localhost is just an entry in your
/etc/hosts file (assuming you're on a un*x-based system), which by
default is configured to resolve to 127.0.0.1. Since Radiant only sees
HTTP - both of those requests would appear identical to it.

In my case - Radiant is serving up the default site regardless of what
Host header it sees.

Do I need to make a change somewhere else to add new sites using the
vhost extension?

Interesting that the Site model doesn't contain a hostname field.
Where is the hostname of each site specified?

Site.find_each {|s| p s}
#"Default"}>
#"Effective Web Presence"}>

Thanks again!

> It depends on what you've setup.
>
> I'll often (in development) set one site to be "localhost" and another to 
> "0.0.0.0" and another to "127.0.0.1"
> All of those point back to your internal webserver and Radiant can answer for 
> 3 different sites.
>
> Does that help?
>
> -Jim


Re: [Radiant] Re: installing scoped_access plugin?

2011-02-08 Thread Fima Leshinsky
yay! my first issue submission - i hope I didn't butcher it :P
https://github.com/saturnflyer/radiant-vhost-extension/issues/issue/10


On Tue, Feb 8, 2011 at 12:06 PM, Jim Gay  wrote:
> Would you mind opening up an issue for this?
>
> https://github.com/saturnflyer/radiant-vhost-extension/issues
>
> On Feb 8, 2011, at 14:54 , Fima Leshinsky wrote:
>
>> Hm .. I also had to set site_admin = true to be able to login to the backend:
>>
>> ree-1.8.7-2010.02 > user = User.find_by_login('admin')
>> ree-1.8.7-2010.02 > user.site_admin = true
>> ree-1.8.7-2010.02 > user.save!
>>
>> On Tue, Feb 8, 2011 at 11:34 AM, Fima Leshinsky  wrote:
>>> Oh wow .. figured it out :) Is this a bug w/ the gem/extension?
>>>
>>> So it looks like add_site_columns.rb is part of the gem:
>>> $ ls -lh 
>>> ~/.rvm/gems/ree-1.8.7-2010.02/gems/radiant-vhost-extension-2.3.1/lib/tasks/
>>> total 24
>>> -rwxr-xr-x  1 fimaleshinsky  staff   1.2K Feb  8 10:02 add_site_columns.rb
>>> -rwxr-xr-x  1 fimaleshinsky  staff   5.6K Feb  8 10:02
>>> vhost_extension_tasks.rake
>>>
>>> I copied it over to lib/tasks and the install rake task completed like
>>> a charm ..
>>> $ cp 
>>> ~/.rvm/gems/ree-1.8.7-2010.02/gems/radiant-vhost-extension-2.3.1/lib/tasks/add_site_columns.rb
>>> lib/tasks/
>>>
>>> $ rake production radiant:extensions:vhost:install --trace
>>> (in /Users/fimaleshinsky/Sites/heroku)
>>> ** Invoke production (first_time)
>>> ** Execute production
>>> ** Invoke environment (first_time)
>>> ** Execute environment
>>> ** Invoke radiant:extensions:vhost:install (first_time)
>>> ** Invoke environment
>>> ** Invoke radiant:extensions:vhost:migrate (first_time)
>>> ** Invoke environment
>>> ** Execute radiant:extensions:vhost:migrate
>>> ** Invoke radiant:extensions:vhost:apply_site_scoping (first_time)
>>> ** Invoke environment
>>> ** Execute radiant:extensions:vhost:apply_site_scoping
>>> ==  AddSiteColumns: migrating 
>>> =
>>> -- add_column("layouts", :site_id, :integer)
>>>   -> 0.0397s
>>> -- add_column("pages", :site_id, :integer)
>>>   -> 0.0047s
>>> -- add_column("snippets", :site_id, :integer)
>>>   -> 0.0055s
>>> -- add_index(:snippets, [:name, :site_id], {:unique=>true})
>>>   -> 0.0060s
>>> -- add_index(:snippets, [:name, :site_id])
>>>   -> 0.0007s
>>> ==  AddSiteColumns: migrated (0.0763s) 
>>> 
>>>
>>> ** Execute radiant:extensions:vhost:install
>>>
>>>
>>> On Tue, Feb 8, 2011 at 11:31 AM, Fima Leshinsky  wrote:
>>>> The only file I have in lib/tasks is vhost_extension_tasks.rake .. is
>>>> lib/tasks/add_site_columns supposed to be copied over during the
>>>> extension install?
>
>


Re: [Radiant] Re: installing scoped_access plugin?

2011-02-08 Thread Fima Leshinsky
Hm .. I also had to set site_admin = true to be able to login to the backend:

ree-1.8.7-2010.02 > user = User.find_by_login('admin')
ree-1.8.7-2010.02 > user.site_admin = true
ree-1.8.7-2010.02 > user.save!

On Tue, Feb 8, 2011 at 11:34 AM, Fima Leshinsky  wrote:
> Oh wow .. figured it out :) Is this a bug w/ the gem/extension?
>
> So it looks like add_site_columns.rb is part of the gem:
> $ ls -lh 
> ~/.rvm/gems/ree-1.8.7-2010.02/gems/radiant-vhost-extension-2.3.1/lib/tasks/
> total 24
> -rwxr-xr-x  1 fimaleshinsky  staff   1.2K Feb  8 10:02 add_site_columns.rb
> -rwxr-xr-x  1 fimaleshinsky  staff   5.6K Feb  8 10:02
> vhost_extension_tasks.rake
>
> I copied it over to lib/tasks and the install rake task completed like
> a charm ..
> $ cp 
> ~/.rvm/gems/ree-1.8.7-2010.02/gems/radiant-vhost-extension-2.3.1/lib/tasks/add_site_columns.rb
> lib/tasks/
>
> $ rake production radiant:extensions:vhost:install --trace
> (in /Users/fimaleshinsky/Sites/heroku)
> ** Invoke production (first_time)
> ** Execute production
> ** Invoke environment (first_time)
> ** Execute environment
> ** Invoke radiant:extensions:vhost:install (first_time)
> ** Invoke environment
> ** Invoke radiant:extensions:vhost:migrate (first_time)
> ** Invoke environment
> ** Execute radiant:extensions:vhost:migrate
> ** Invoke radiant:extensions:vhost:apply_site_scoping (first_time)
> ** Invoke environment
> ** Execute radiant:extensions:vhost:apply_site_scoping
> ==  AddSiteColumns: migrating 
> =
> -- add_column("layouts", :site_id, :integer)
>   -> 0.0397s
> -- add_column("pages", :site_id, :integer)
>   -> 0.0047s
> -- add_column("snippets", :site_id, :integer)
>   -> 0.0055s
> -- add_index(:snippets, [:name, :site_id], {:unique=>true})
>   -> 0.0060s
> -- add_index(:snippets, [:name, :site_id])
>   -> 0.0007s
> ==  AddSiteColumns: migrated (0.0763s) 
> 
>
> ** Execute radiant:extensions:vhost:install
>
>
> On Tue, Feb 8, 2011 at 11:31 AM, Fima Leshinsky  wrote:
>> The only file I have in lib/tasks is vhost_extension_tasks.rake .. is
>> lib/tasks/add_site_columns supposed to be copied over during the
>> extension install?


Re: [Radiant] Re: installing scoped_access plugin?

2011-02-08 Thread Fima Leshinsky
The only file I have in lib/tasks is vhost_extension_tasks.rake .. is
lib/tasks/add_site_columns supposed to be copied over during the
extension install?

On Tue, Feb 8, 2011 at 10:05 AM, Fima Leshinsky  wrote:
> yup - same exact problem ..
>
> Here's where this file is being required:
>
> $ grep -r add_site_columns .
> ./lib/tasks/vhost_extension_tasks.rake:        require
> "#{File.dirname(__FILE__)}/add_site_columns"
>
> On Tue, Feb 8, 2011 at 9:59 AM, john  wrote:
>> do you have the same problem if you install the extension into
>> vendor/extensions?
>


Re: [Radiant] Re: installing scoped_access plugin?

2011-02-08 Thread Fima Leshinsky
Oh wow .. figured it out :) Is this a bug w/ the gem/extension?

So it looks like add_site_columns.rb is part of the gem:
$ ls -lh 
~/.rvm/gems/ree-1.8.7-2010.02/gems/radiant-vhost-extension-2.3.1/lib/tasks/
total 24
-rwxr-xr-x  1 fimaleshinsky  staff   1.2K Feb  8 10:02 add_site_columns.rb
-rwxr-xr-x  1 fimaleshinsky  staff   5.6K Feb  8 10:02
vhost_extension_tasks.rake

I copied it over to lib/tasks and the install rake task completed like
a charm ..
$ cp 
~/.rvm/gems/ree-1.8.7-2010.02/gems/radiant-vhost-extension-2.3.1/lib/tasks/add_site_columns.rb
lib/tasks/

$ rake production radiant:extensions:vhost:install --trace
(in /Users/fimaleshinsky/Sites/heroku)
** Invoke production (first_time)
** Execute production
** Invoke environment (first_time)
** Execute environment
** Invoke radiant:extensions:vhost:install (first_time)
** Invoke environment
** Invoke radiant:extensions:vhost:migrate (first_time)
** Invoke environment
** Execute radiant:extensions:vhost:migrate
** Invoke radiant:extensions:vhost:apply_site_scoping (first_time)
** Invoke environment
** Execute radiant:extensions:vhost:apply_site_scoping
==  AddSiteColumns: migrating =
-- add_column("layouts", :site_id, :integer)
   -> 0.0397s
-- add_column("pages", :site_id, :integer)
   -> 0.0047s
-- add_column("snippets", :site_id, :integer)
   -> 0.0055s
-- add_index(:snippets, [:name, :site_id], {:unique=>true})
   -> 0.0060s
-- add_index(:snippets, [:name, :site_id])
   -> 0.0007s
==  AddSiteColumns: migrated (0.0763s) 

** Execute radiant:extensions:vhost:install


On Tue, Feb 8, 2011 at 11:31 AM, Fima Leshinsky  wrote:
> The only file I have in lib/tasks is vhost_extension_tasks.rake .. is
> lib/tasks/add_site_columns supposed to be copied over during the
> extension install?
>
> On Tue, Feb 8, 2011 at 10:05 AM, Fima Leshinsky  wrote:
>> yup - same exact problem ..
>>
>> Here's where this file is being required:
>>
>> $ grep -r add_site_columns .
>> ./lib/tasks/vhost_extension_tasks.rake:        require
>> "#{File.dirname(__FILE__)}/add_site_columns"
>>
>> On Tue, Feb 8, 2011 at 9:59 AM, john  wrote:
>>> do you have the same problem if you install the extension into
>>> vendor/extensions?
>>
>


Re: [Radiant] Re: installing scoped_access plugin?

2011-02-08 Thread Fima Leshinsky
yup - same exact problem ..

Here's where this file is being required:

$ grep -r add_site_columns .
./lib/tasks/vhost_extension_tasks.rake:require
"#{File.dirname(__FILE__)}/add_site_columns"

On Tue, Feb 8, 2011 at 9:59 AM, john  wrote:
> do you have the same problem if you install the extension into
> vendor/extensions?


Re: [Radiant] Re: installing scoped_access plugin?

2011-02-08 Thread Fima Leshinsky
Thanks Jim - that's exactly what I was trying to do. Here's were I'm
getting stuck:

$ gem install radiant-vhost-extension
(update config/environment.rb with: config.gem
'radiant-vhost-extension', :lib => false)
$ rake production radiant:extensions:vhost:update
$ rake production radiant:extensions:vhost:install --trace
(in /Users/fimaleshinsky/Sites/heroku)
** Invoke production (first_time)
** Execute production
** Invoke environment (first_time)
** Execute environment
** Invoke radiant:extensions:vhost:install (first_time)
** Invoke environment
** Invoke radiant:extensions:vhost:migrate (first_time)
** Invoke environment
** Execute radiant:extensions:vhost:migrate
** Invoke radiant:extensions:vhost:apply_site_scoping (first_time)
** Invoke environment
** Execute radiant:extensions:vhost:apply_site_scoping
rake aborted!
no such file to load --
/Users/fimaleshinsky/Sites/heroku/lib/tasks/add_site_columns

Any ideas?

On Tue, Feb 8, 2011 at 9:24 AM, Jim Gay  wrote:
> On Feb 8, 2011, at 12:14 , Fima Leshinsky wrote:
>
>> Thanks John! So odd. It worked on the "Empty" database template
>> install but when I tried to run it w/ any of the other options it
>> failed:
>>
>> Select a database template:
>> 1. Empty
>> 2. Roasters (a coffee-themed blog / brochure)
>> 3. Simple Blog
>> 4. Styled Blog
>> [1-4]: 1
>>
>> Any ideas how to get the Roasters template to work w/ the vhost extension?
>
> Try setting up your template first, and then install the extension (you can 
> move it out of vendor/extensions and then move it back in if need be).
>
> I'm in the process of making this extension easier to use (it's not mine 
> originally) but haven't done much with it lately.
>
> -Jim


Re: [Radiant] Re: installing scoped_access plugin?

2011-02-08 Thread Fima Leshinsky
Thanks John! So odd. It worked on the "Empty" database template
install but when I tried to run it w/ any of the other options it
failed:

Select a database template:
1. Empty
2. Roasters (a coffee-themed blog / brochure)
3. Simple Blog
4. Styled Blog
[1-4]: 1

Any ideas how to get the Roasters template to work w/ the vhost extension?


On Tue, Feb 8, 2011 at 9:06 AM, john  wrote:
> the plugin should be included with the extension. setup is pretty
> straightforward:
> radiant -d sqlite3 radiant_vhost
> cd !$
> rake db:bootstrap
> git clone git://github.com/saturnflyer/radiant-vhost-extension.git
> vendor/extensions/vhost
> rake radiant:extensions:vhost:install
> ./script/server
>


Re: [Radiant] Re: Radiant on Heroku - Extension problem

2011-02-08 Thread Fima Leshinsky
I just went through this dance last week :) Check out:
http://docs.heroku.com/constraints#git-submodules

Also here's the quick and easy way to install extensions that play
well w/ Heroku:
$ git clone git://github.com/saturnflyer/radiant-vhost-extension.git
vendor/extensions/vhost

and optionally/when available:
$ rake radiant:extensions::update
$ rake radiant:extensions::install

then push to Heroku!
$ git push heroku master
$ heroku db:push

Hope that helps!

On Tue, Feb 8, 2011 at 2:42 AM, Hadi S.  wrote:
> ok, i figured out why the extensions directory is empty. git added
> those as submodules, so git never pushed them to the server. Now i
> have to figure out how to remove the submodule and add the extensions
> as "normal" content.
>
> On Feb 8, 10:17 am, "Hadi S."  wrote:
>> Hi
>>
>> i successfully pushed a radiant project to heroku. everything works
>> fine except that the extensions in vendor/extensions aren't loaded.
>> Although locally everything works fine, the extensions in the
>> extensions directory are empty on heroku, So what could the cause be?


Re: [Radiant] Re: Kramdown vs. markdown filter

2011-01-01 Thread Fima Leshinsky
so i removed the kramdown filter extension (rm -rf
vendor/extensions/kramdown-filter) and re-installed it as a gem:

$ gem install radiant-kramdown_filter-extension
+ added config.gem 'radiant-kramdown_filter-extension' to
config/environment.rb
+ restarted my app server

voila! kramdown works perfectly w/ the existing markdown filter :)

I'm still interested in how one would go about disabling/removing the
markdown filter that comes packaged w/ radiant so if you know and have a
minute to reply please do so


[Radiant] extensions not visibile after deploy w/ capistrano + git

2010-12-18 Thread Fima Leshinsky
I can't figure out why - but I'm not seeing my extensions (code_ray and
capistrano) in the admin panel after I deploy my radiant app w/ capistrano +
git. I have capistrano configured to deploy the extensions as git submodules
and they appear to be deployed properly per the ls below but again - nothing
showing up in the admin panel. Thanks for the help!

[f...@localhost radiant]$ ls -lh current/vendor/extensions/code_ray/
total 32K
drwxrwxr-x 3 fima fima 4.0K Dec 18 11:06 app
-rw-rw-r-- 1 fima fima  282 Dec 18 11:06 code_ray_extension.rb
drwxrwxr-x 3 fima fima 4.0K Dec 18 11:06 lib
drwxrwxr-x 3 fima fima 4.0K Dec 18 11:06 public
-rw-rw-r-- 1 fima fima 4.2K Dec 18 11:06 Rakefile
-rw-rw-r-- 1 fima fima 1.5K Dec 18 11:06 README
drwxrwxr-x 3 fima fima 4.0K Dec 18 11:06 spec


Re: [Radiant] Re: deploying radiant 0.9.1 with capistrano

2010-12-18 Thread Fima Leshinsky
looks like this was an issue w/ my env path from what i could tell -
everything is working fine now . i'm able to deploy + migrate cleanly.
woohoo!

On Fri, Dec 17, 2010 at 4:31 PM, Fima Leshinsky  wrote:

>  so here's where things are failing for me now. This seems like it's
> specific to capistrano and not radiant :/
>
> * executing `deploy:update_code'updating the cached checkout on all
> servers
> executing locally: "git ls-remote g...@github.com:fleshins/radiant.git
> master"
>   * executing "if [ -d /var/www/html/radiant/shared/cached-copy ]; then cd
> /var/www/html/radiant/shared/cached-copy && git fetch -q origin && git reset
> -q --hard 04edfa7f2f3f00635ac7dcda343ab891cf06fd68 && git submodule -q init
> && for mod in `git submodule status | awk '{ print $2 }'`; do git config -f
> .git/config submodule.${mod}.url `git config -f .gitmodules --get
> submodule.${mod}.url` && echo Synced $mod; done && git submodule -q sync &&
> git submodule -q update && git clean -q -d -x -f; else git clone -q
> g...@github.com:fleshins/radiant.git
> /var/www/html/radiant/shared/cached-copy && cd
> /var/www/html/radiant/shared/cached-copy && git checkout -q -b deploy
> 04edfa7f2f3f00635ac7dcda343ab891cf06fd68 && git submodule -q init && git
> submodule -q sync && git submodule -q update; fi"
>
> I tried running this locally on the target server and got a syntax error.
>  :P
>
>
>
> On Fri, Dec 17, 2010 at 1:22 PM, Fima Leshinsky wrote:
>
>> hm .. so it looks like git is placing the submodules (extensions) located
>> in vendor/extensions in shared/cached-copy instead of the 'current'
>> directory . do i need to symlink the extensions from the shared directory to
>> 'current'?
>>
>>
>> On Fri, Dec 17, 2010 at 11:06 AM, Fima Leshinsky wrote:
>>
>>> ok so the log file error is due to the log file not existing in my shared
>>> directory - not sure how to address it but probably not a show stopper
>>>
>>> the extension errors appear to be due to me not using Git properly? I
>>> found a thread that discusses having to use Git submodules to manage
>>> extensions .. going to play with that and see what happens :P
>>>
>>
>


Re: [Radiant] Re: deploying radiant 0.9.1 with capistrano

2010-12-17 Thread Fima Leshinsky
 so here's where things are failing for me now. This seems like it's
specific to capistrano and not radiant :/

* executing `deploy:update_code'updating the cached checkout on all
servers
executing locally: "git ls-remote g...@github.com:fleshins/radiant.git
master"
  * executing "if [ -d /var/www/html/radiant/shared/cached-copy ]; then cd
/var/www/html/radiant/shared/cached-copy && git fetch -q origin && git reset
-q --hard 04edfa7f2f3f00635ac7dcda343ab891cf06fd68 && git submodule -q init
&& for mod in `git submodule status | awk '{ print $2 }'`; do git config -f
.git/config submodule.${mod}.url `git config -f .gitmodules --get
submodule.${mod}.url` && echo Synced $mod; done && git submodule -q sync &&
git submodule -q update && git clean -q -d -x -f; else git clone -q
g...@github.com:fleshins/radiant.git /var/www/html/radiant/shared/cached-copy
&& cd /var/www/html/radiant/shared/cached-copy && git checkout -q -b deploy
04edfa7f2f3f00635ac7dcda343ab891cf06fd68 && git submodule -q init && git
submodule -q sync && git submodule -q update; fi"

I tried running this locally on the target server and got a syntax error.
 :P



On Fri, Dec 17, 2010 at 1:22 PM, Fima Leshinsky  wrote:

> hm .. so it looks like git is placing the submodules (extensions) located
> in vendor/extensions in shared/cached-copy instead of the 'current'
> directory . do i need to symlink the extensions from the shared directory to
> 'current'?
>
>
> On Fri, Dec 17, 2010 at 11:06 AM, Fima Leshinsky wrote:
>
>> ok so the log file error is due to the log file not existing in my shared
>> directory - not sure how to address it but probably not a show stopper
>>
>> the extension errors appear to be due to me not using Git properly? I
>> found a thread that discusses having to use Git submodules to manage
>> extensions .. going to play with that and see what happens :P
>>
>


Re: [Radiant] Re: deploying radiant 0.9.1 with capistrano

2010-12-17 Thread Fima Leshinsky
hm .. so it looks like git is placing the submodules (extensions) located in
vendor/extensions in shared/cached-copy instead of the 'current' directory .
do i need to symlink the extensions from the shared directory to 'current'?


On Fri, Dec 17, 2010 at 11:06 AM, Fima Leshinsky  wrote:

> ok so the log file error is due to the log file not existing in my shared
> directory - not sure how to address it but probably not a show stopper
>
> the extension errors appear to be due to me not using Git properly? I found
> a thread that discusses having to use Git submodules to manage extensions ..
> going to play with that and see what happens :P
>


Re: [Radiant] Re: deploying radiant 0.9.1 with capistrano

2010-12-17 Thread Fima Leshinsky
ok so the log file error is due to the log file not existing in my shared
directory - not sure how to address it but probably not a show stopper

the extension errors appear to be due to me not using Git properly? I found
a thread that discusses having to use Git submodules to manage extensions ..
going to play with that and see what happens :P

On Fri, Dec 17, 2010 at 10:57 AM, Fima Leshinsky  wrote:

> hm .. so I got the database.yml symlink in place but now there's this. any
> ideas how to debug it? the user that I'm connecting to the server with owns
> all of the application tree so I'm not sure why it's complaining about
> access to the log file. any ideas where to even begin?
>
>   * executing "cd /var/www/html/radiant/releases/20101217185342; rake
> RAILS_ENV=production  db:migrate"
> servers: ["172.116.1.12"]
> [172.116.1.12] executing command
>  ** [out :: 172.116.1.12] (in
> /var/www/html/radiant/releases/20101217185342)
>  ** [out :: 172.116.1.12] Rails Error: Unable to access log file. Please
> ensure that /var/www/html/radiant/releases/20101217185342/log/production.log
> exists and is chmod 0666. The log level has been raised to WARN and the
> output directed to STDERR until the problem is fixed.
>  ** [out :: 172.116.1.12] Could not load extension from file:
> capistrano_extension.
>  ** [out :: 172.116.1.12] # CapistranoExtension>
>  ** [out :: 172.116.1.12] Could not load extension from file:
> code_ray_extension.
>  ** [out :: 172.116.1.12] # CodeRayExtension>
> command finished
>
>
>


Re: [Radiant] Re: deploying radiant 0.9.1 with capistrano

2010-12-17 Thread Fima Leshinsky
hm .. so I got the database.yml symlink in place but now there's this. any
ideas how to debug it? the user that I'm connecting to the server with owns
all of the application tree so I'm not sure why it's complaining about
access to the log file. any ideas where to even begin?

  * executing "cd /var/www/html/radiant/releases/20101217185342; rake
RAILS_ENV=production  db:migrate"
servers: ["172.116.1.12"]
[172.116.1.12] executing command
 ** [out :: 172.116.1.12] (in /var/www/html/radiant/releases/20101217185342)
 ** [out :: 172.116.1.12] Rails Error: Unable to access log file. Please
ensure that /var/www/html/radiant/releases/20101217185342/log/production.log
exists and is chmod 0666. The log level has been raised to WARN and the
output directed to STDERR until the problem is fixed.
 ** [out :: 172.116.1.12] Could not load extension from file:
capistrano_extension.
 ** [out :: 172.116.1.12] #
 ** [out :: 172.116.1.12] Could not load extension from file:
code_ray_extension.
 ** [out :: 172.116.1.12] #
command finished


Re: [Radiant] Re: deploying radiant 0.9.1 with capistrano

2010-12-16 Thread Fima Leshinsky
Thanks for all the helpful posts. So I've got capistrano deploying my
github-hosted application to my staging server. Works great! I'm not using
bundler yet as I'm not sure of the benefits there. One of the problems I'm
running into is deploying migrations (capistrano complains that it's not
able to find /config/database.yml in the current release directory).

I've found a couple of blog posts describing solutions to the issue e.g.
http://www.simonecarletti.com/blog/2009/06/capistrano-and-database-yml/

I'm curious why none of your deploy.rb scripts contained any reference to
the database config file. How are you guys deploying migrations?


Re: [Radiant] Re: deploying radiant 0.9.1 with capistrano

2010-12-14 Thread Fima Leshinsky
hm .. if you're not using bundler then maybe i shouldnt either? maybe it's
overkill for a noob like me who's just starting out w/ ruby / radiant. how
do you handle the case where you want to play around w/ a gem in your dev.
environment but not deploy it to production?

On Tue, Dec 14, 2010 at 12:02 PM, Brad Herman wrote:

>  I'm not entirely sure, but I would imagine you would just create a task
> for installing the bundle in your cap file.  LIke deploy:bundle:install or
> something along those lines.


Re: [Radiant] deploying radiant 0.9.1 with capistrano

2010-12-14 Thread Fima Leshinsky
You guys are awesome will give this a shot. Where does bundler fit into all of 
this?


Re: [Radiant] Re: Re: best code syntax highlighting solution

2010-12-13 Thread Fima Leshinsky
Looks like coderay is working well. I installed:

coderay gem + radiant extension @ https://github.com/phallstrom/code_ray

and now I can specify  blocks!

not sure what the benefits are of kramdown over the existing Markdown
radiant filter that comes with the "Coffee blog" template. If you guys can
shed some light on why kramdown is a better option I'd appreciate it.

Thanks again!
Fima


Re: [Radiant] Re: best code syntax highlighting solution

2010-12-12 Thread Fima Leshinsky
So looks like there are two radiant extensions below that allow you to
leverage the coderay gem:
https://github.com/phallstrom/code_ray
https://github.com/alno/radiant-code-extension

I'm inclined to use the the 2nd one since it supports other syntax
highlighters beyond coderay. What are your thoughts on which one to use?

Also, I'm curious, why use kramdown over the existing Markdown radiant
filter? Speed or other reasons as well?

Thanks!


Re: [Radiant] Re: best code syntax highlighting solution

2010-12-12 Thread Fima Leshinsky
don't mind me - I'm just going to update this thread as I figure more things
out .. looks like there's a kramdown radiant filter :)
http://ext.radiantcms.org/extensions/192-kramdown-filter

now just need to figure out how to leverage the coderay gem :P


Re: [Radiant] best code syntax highlighting solution

2010-12-08 Thread Fima Leshinsky
Thanks John - will take a look. Do you have any public pages you can share
as examples?


Re: [Radiant] Re: image 404s

2010-12-01 Thread Fima Leshinsky
Yup so your request path/URI is wrong. Do a:

$ pwd; ls -lh

inside your image directory

On Dec 1, 2010, at 8:08 PM, rosslaird  wrote:

> Nope. I get 404 for them all.
> 
> R.
> 
> On Dec 1, 7:55 pm, Fima Leshinsky  wrote:
>> Can you hit other assets in the /admin dir w/ curl and do u get a 200?
> 
>> 
>> On Dec 1, 2010, at 6:02 PM, rosslaird  wrote:
>> 
>>> Thanks for the help.
>>> Unless I've done something incorrectly, this:
>> 
>>>> select * from page_parts where content like '%button.png%', etc.
>> 
>>> returns no results (I did this in PHPMyAdmin) for any of the tables
>>> with a content field.
>> 
>>>> For the new-snippet.png 404 - that's a tough one. I'd use curl to debug it 
>>>> -
>> 
>>> Here's what I get from "curl -svo /dev/null localhost/images/admin/new-
>>> snippet.png":
>> 
>>> GET /images/admin/new-snippet.png HTTP/1.1
>>> User-Agent: curl/7.21.0 (i686-pc-linux-gnu) libcurl/7.21.0 OpenSSL/
>>> 0.9.8o zlib/1.2.3.4 libidn/1.18
>>> Host: localhost
>>> Accept: */*
>> 
>>> HTTP/1.1 404 Not Found
>>> Date: Thu, 02 Dec 2010 01:51:01 GMT
>>> Server: Apache/2.2.16 (Ubuntu)
>>> Vary: Accept-Encoding
>> 
>>> I'm not sure where to go next with that.
>> 
>>> So, overall, I am learning things (the upside) but not closer to
>>> resolving this (the downside).
>>> Thanks again for the help.
>> 
>>> Cheers.
>> 
>>> Ross
>> 
>> 


Re: [Radiant] Re: image 404s

2010-12-01 Thread Fima Leshinsky
Can you hit other assets in the /admin dir w/ curl and do u get a 200?

On Dec 1, 2010, at 6:02 PM, rosslaird  wrote:

> Thanks for the help.
> Unless I've done something incorrectly, this:
> 
>> select * from page_parts where content like '%button.png%', etc.
> 
> returns no results (I did this in PHPMyAdmin) for any of the tables
> with a content field.
> 
>> For the new-snippet.png 404 - that's a tough one. I'd use curl to debug it -
> 
> Here's what I get from "curl -svo /dev/null localhost/images/admin/new-
> snippet.png":
> 
> GET /images/admin/new-snippet.png HTTP/1.1
> User-Agent: curl/7.21.0 (i686-pc-linux-gnu) libcurl/7.21.0 OpenSSL/
> 0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: localhost
> Accept: */*
> 
> HTTP/1.1 404 Not Found
> Date: Thu, 02 Dec 2010 01:51:01 GMT
> Server: Apache/2.2.16 (Ubuntu)
> Vary: Accept-Encoding
> 
> I'm not sure where to go next with that.
> 
> So, overall, I am learning things (the upside) but not closer to
> resolving this (the downside).
> Thanks again for the help.
> 
> Cheers.
> 
> Ross


Re: [Radiant] image 404s

2010-12-01 Thread Fima Leshinsky
connect to your DB and do a select * across all the tables w/ a content
field:

page_parts
pages
snippets
layouts

e.g. select * from page_parts where content like '%button.png%', etc.

That should identify where the reference to the asset is.

For the new-snippet.png 404 - that's a tough one. I'd use curl to debug it -
confirm the 404 w/ curl and then go from there. My guess is the browser is
requesting it with the wrong URI.

e.g. curl -svo /dev/null localhost/images/admin/new-snippet.png

HTH,
Fima

On Wed, Dec 1, 2010 at 4:25 PM, rosslaird  wrote:

> I have just started using Radiant (which is just great, by the way),
> so apologies in advance for what may be a very simple question: the
> server log shows various 404s to image files: button.png and new-
> snippet.png are two examples. My setup is on locahost, for testing, so
> the 404 refers to (for example) this url:
> http://localhost/images/admin/button.png.
> There are quite a few image files in /images/admin, but not
> button.png. On the other hand, there is a new-snippet.png in the
> images/admin directory, but I still get a 404 for that file as well.
> These image files are not ones that I have created, so I'm not sure
> what's going on. I do have some extensions installed (Chronicle, blog,
> mailer, paperclipped, settings) and I don't know if these are a
> factor. I have combed through all the css files I can find, and
> nothing seems to point to these missing files.
>
> Suggestions?
>
> Thanks in advance.
>
> Ross Laird


Re: [Radiant] Re: How can i deploy radiant application to sub-directory?

2010-11-27 Thread Fima Leshinsky
Why wouldn't a web-server-level (e.g. Apache) rewrite work?

Thanks,
Fima