Re: Camping tutorials for education?

2009-06-16 Thread Dave Everitt
@Julik: I agree about the 1.5.180 but it would be good to have it  
become 'official' - the main problem is that many of the Camping  
links out there don't refer to it, so people are downloading 1.5,  
trying the examples and having some problems e.g.:
"I've had a lot of people contact me asking questions about errors  
and issues with content from my presentation or from conversations  
with them when really the only issue was that they were on 1.5 and  
needed to be on trunk." (2008, Keeping Camping going: msg#8  
lang.ruby.camping.general) - Jeremy McAnally


He also has a nice Camping presentation (also in PDF) from 2007:
http://slideshow.rubyforge.org/camping.html

My own tutorial materials will evolve as I use Camping, and I'll  
share them if things turns out okay. At present, I'm using it to  
generate static pages for prototyping a website, a purpose for which  
it works very well (a Camping niche market!?). As soon as I get the  
blog example working well with 1.5.180, I'll write that up too.


Then on to 2.0? The only thing holding me back there is getting Rack  
up and running and playing nicely with Apache. So far I've just seen  
(and reversed) the lobster from the rack gem, but have yet to make  
time to do the latter.


In order to get a more complete picture, I spent most of last week  
researching (and trying) other more compact Ruby frameworks out there  
(http://wiki.ramaze.net/Home#other-frameworks). It seems Ramaze and  
Sinatra have the edge when it comes to nice and informative websites.  
Jeremy McAnally's Vintage also seem okay, but I'm not sure about Wuby  
and some of the others have very poor documentation or web presence.  
I still like Camping, but there's a way to go if we're going to match  
the Sinatra or Ramaze sites, and that's something to which I'd  
certainly like to contribute.


- Dave Everitt

Well if Magnus has indeed released 1.5.180 then this is the latest  
baseline stable. I am running it on many apps and it works pretty  
OK with most irritating bugs (like R not working properly for  
additiona option hashes) weeded out. If you are into experiments,  
you can try 2.0 but I never tried it out in earnest.


If you want to issue good reading materials to students you will  
possibly have to write them yourself, must be doable in a day.




___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping tutorials for education?

2009-06-11 Thread Jonathan Groll

On Thu, Jun 11, 2009 at 10:44:30AM -0400, David Susco wrote:

@Jonathan - Re: your apache conf, I actually didn't need the directory
directive and the execcgi option to get this to work. Why did you list
it?


You don't need the execcgi, and the reason I give the directory
directive is to set the permissions to allow, deny just for that
directory (by default all my permissions are set to deny,allow for
extra security). So skip the  section if you don't need it.


3. Look into performance and security. Would installing fastcgi or
something similar speed passenger up any?



Fastcgi, which creates persistent ruby backend processes does a
similar thing to passenger. It only makes sense to my mind to have one
thing managing your ruby processes.

Cheers,
Jonathan.
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping tutorials for education?

2009-06-11 Thread David Susco
Scratch that, got everything working with 1.8.7-p173 and selinux
disabled. I have to say, rack apps are pretty easy to deploy with
passenger once you get the thing installed and working :P.

@Jonathan - Re: your apache conf, I actually didn't need the directory
directive and the execcgi option to get this to work. Why did you list
it?

So here's my TODO list:

1. Try to get it working with selinux enabled.
2. Put together a tutorial for the wiki (which one would you guys like
to see it on? github?)
3. Look into performance and security. Would installing fastcgi or
something similar speed passenger up any?

On Wed, Jun 10, 2009 at 8:45 PM, David Susco wrote:
> OK, good to know. What the latest version I can use?
>
> Dave
>
> On Wed, Jun 10, 2009 at 5:46 PM, Magnus Holm wrote:
>> Unfornately, Camping doesn't (yet) work on Ruby 1.9.1. Unless someone else want to try
>> now, I'm going to have a look at it *after* 2.0 is released.
>>
>> //Magnus Holm
>>
>>
>> On Wed, Jun 10, 2009 at 22:30, David Susco  wrote:
>>>
>>> I've disabled SELinux to see if I could get any farther.
>>>
>>> I managed to get passenger installed and working, however a fancy
>>> passenger generated page is telling me the app couldn't be started due
>>> to this error:
>>>
>>> `require':
>>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-1.9.316/lib/camping.rb:11:
>>> syntax error, unexpected tLABEL (SyntaxError)
>>> p[0]==?/?...@root+p:p end;def URL c='/',*a;c=R(c,...
>>>
>>> It's the same thing when I try to rackup the .ru file, and the same
>>> when I try to execute this little bit of code:
>>>
>>> #!/usr/bin/env ruby -rubygems
>>> gem 'camping', '>=1.9.316'
>>> %w(rack camping).each { |lib| require lib }
>>> puts 'done'
>>>
>>> I'm tried reinstalled camping 1.9.316 but that didn't change anything.
>>> Any ideas?
>>>
>>> Dave
>>>
>>> On Wed, Jun 10, 2009 at 10:39 AM, David Susco wrote:
>>> > I'm trying to get passenger working presently, once I do I'll let you
>>> > know how the rest of it goes.
>>> >
>>> > When I try to load the module in the apache conf I get the following
>>> > error:
>>> >
>>> > Cannot load
>>> > /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
>>> > into server:
>>> > /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so:
>>> > failed to map segment from shared object: Permission denied
>>> >
>>> > I'm assuming it's an SELinux problem, has anyone run into it before?
>>> > I've done the following already, so it hasn't helped:
>>> >
>>> > http://www.modrails.com/documentation/Users%20guide.html#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it
>>> >
>>> > Dave
>>> >
>>> >
>>> > On Tue, Jun 9, 2009 at 11:28 AM, Jonathan Groll
>>> > wrote:
>>> >> Hi David,
>>> >>
>>> >> On Tue, Jun 09, 2009 at 09:29:22AM -0400, David Susco wrote:
>>> >>>
>>> >>> I'd definitely be interested in seeing any work you do with this.
>>> >>> Having it up on the wiki would be nice too.
>>> >>>
>>> >>> I'm still trying to figure out deployment with camping 1.5. I've
>>> >>> experimented with 1.9.316 and rack but have yet to get an app to work
>>> >>> with that. The same with Picnic.
>>> >>
>>> >> Been meaning to write a quick overview of how I did it for you (as
>>> >> documentation is super sparse still). Briefly:
>>> >>
>>> >> (1) Read the passenger user guide at:
>>> >> http://www.modrails.com/documentation/Users%20guide.html
>>> >>
>>> >> I installed passenger from a gem but see the user's guide if you need
>>> >> to install on debian using apt (it is in the Ubuntu repositories
>>> >> already).
>>> >> Similarly rack is from a gem, and I use the same version of camping as
>>> >> you (from Judofyr's gem server).
>>> >>
>>> >> (2) Try and get the "hello world" from the passenger user guide to
>>> >> work for you.
>>> >>
>>> >> (3) Then try and get the blog example working that is shipped with
>>> >> camping. Here is a config.ru that works for that:
>>> >>
>>> >> require 'rubygems'
>>> >> require 'rack'
>>> >> require 'camping'
>>> >> require 'blog'
>>> >> Blog::Models::Base.establish_connection :adapter => "sqlite3",
>>> >> :database => "/home/jonathan/.camping.db"
>>> >> run Blog
>>> >>
>>> >> Change the database path to one you have on your system. You may need
>>> >> something like:
>>> >> Blog::Models.create_schema :assume => (Blog::Models::Post.table_exists?
>>> >> ?
>>> >> 1.0 : 0.0)
>>> >>
>>> >> before "run blog" if your sqlite database doesn't yet have the schema
>>> >> for the blog example.
>>> >>
>>> >> (4) And the apache config that I used was something like:
>>> >>
>>> >> 
>>> >>              Options ExecCGI FollowSymLinks
>>> >>                 AllowOverride all
>>> >>                    Allow from all
>>> >> 
>>> >> 
>>> >>    ServerName www.rackexample.com
>>> >>    DocumentRoot /var/www/blog/public
>>> >> 
>>> >>
>>> >> You may need to edit your hosts file so that www.rackexample.com
>>> >> resolves to your apache serve

Re: Camping tutorials for education?

2009-06-11 Thread Julik Tarkhanov


On 11 Jun 2009, at 02:45, David Susco wrote:


OK, good to know. What the latest version I can use?



Well if Magnus has indeed released 1.5.180 then this is the latest  
baseline stable. I am running it on many apps and it works pretty OK  
with most irritating bugs (like R not working properly for additiona  
option hashes) weeded out. If you are into experiments, you can try  
2.0 but I never tried it out in earnest.


If you want to issue good reading materials to students you will  
possibly have to write them yourself, must be doable in a day.

--
Julik Tarkhanov
m...@julik.nl





___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping tutorials for education?

2009-06-10 Thread David Susco
OK, good to know. What the latest version I can use?

Dave

On Wed, Jun 10, 2009 at 5:46 PM, Magnus Holm wrote:
> Unfornately, Camping doesn't (yet) work on Ruby 1.9.1. Unless someone else want to try
> now, I'm going to have a look at it *after* 2.0 is released.
>
> //Magnus Holm
>
>
> On Wed, Jun 10, 2009 at 22:30, David Susco  wrote:
>>
>> I've disabled SELinux to see if I could get any farther.
>>
>> I managed to get passenger installed and working, however a fancy
>> passenger generated page is telling me the app couldn't be started due
>> to this error:
>>
>> `require':
>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-1.9.316/lib/camping.rb:11:
>> syntax error, unexpected tLABEL (SyntaxError)
>> p[0]==?/?...@root+p:p end;def URL c='/',*a;c=R(c,...
>>
>> It's the same thing when I try to rackup the .ru file, and the same
>> when I try to execute this little bit of code:
>>
>> #!/usr/bin/env ruby -rubygems
>> gem 'camping', '>=1.9.316'
>> %w(rack camping).each { |lib| require lib }
>> puts 'done'
>>
>> I'm tried reinstalled camping 1.9.316 but that didn't change anything.
>> Any ideas?
>>
>> Dave
>>
>> On Wed, Jun 10, 2009 at 10:39 AM, David Susco wrote:
>> > I'm trying to get passenger working presently, once I do I'll let you
>> > know how the rest of it goes.
>> >
>> > When I try to load the module in the apache conf I get the following
>> > error:
>> >
>> > Cannot load
>> > /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
>> > into server:
>> > /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so:
>> > failed to map segment from shared object: Permission denied
>> >
>> > I'm assuming it's an SELinux problem, has anyone run into it before?
>> > I've done the following already, so it hasn't helped:
>> >
>> > http://www.modrails.com/documentation/Users%20guide.html#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it
>> >
>> > Dave
>> >
>> >
>> > On Tue, Jun 9, 2009 at 11:28 AM, Jonathan Groll
>> > wrote:
>> >> Hi David,
>> >>
>> >> On Tue, Jun 09, 2009 at 09:29:22AM -0400, David Susco wrote:
>> >>>
>> >>> I'd definitely be interested in seeing any work you do with this.
>> >>> Having it up on the wiki would be nice too.
>> >>>
>> >>> I'm still trying to figure out deployment with camping 1.5. I've
>> >>> experimented with 1.9.316 and rack but have yet to get an app to work
>> >>> with that. The same with Picnic.
>> >>
>> >> Been meaning to write a quick overview of how I did it for you (as
>> >> documentation is super sparse still). Briefly:
>> >>
>> >> (1) Read the passenger user guide at:
>> >> http://www.modrails.com/documentation/Users%20guide.html
>> >>
>> >> I installed passenger from a gem but see the user's guide if you need
>> >> to install on debian using apt (it is in the Ubuntu repositories
>> >> already).
>> >> Similarly rack is from a gem, and I use the same version of camping as
>> >> you (from Judofyr's gem server).
>> >>
>> >> (2) Try and get the "hello world" from the passenger user guide to
>> >> work for you.
>> >>
>> >> (3) Then try and get the blog example working that is shipped with
>> >> camping. Here is a config.ru that works for that:
>> >>
>> >> require 'rubygems'
>> >> require 'rack'
>> >> require 'camping'
>> >> require 'blog'
>> >> Blog::Models::Base.establish_connection :adapter => "sqlite3",
>> >> :database => "/home/jonathan/.camping.db"
>> >> run Blog
>> >>
>> >> Change the database path to one you have on your system. You may need
>> >> something like:
>> >> Blog::Models.create_schema :assume => (Blog::Models::Post.table_exists?
>> >> ?
>> >> 1.0 : 0.0)
>> >>
>> >> before "run blog" if your sqlite database doesn't yet have the schema
>> >> for the blog example.
>> >>
>> >> (4) And the apache config that I used was something like:
>> >>
>> >> 
>> >>              Options ExecCGI FollowSymLinks
>> >>                 AllowOverride all
>> >>                    Allow from all
>> >> 
>> >> 
>> >>    ServerName www.rackexample.com
>> >>    DocumentRoot /var/www/blog/public
>> >> 
>> >>
>> >> You may need to edit your hosts file so that www.rackexample.com
>> >> resolves to your apache server.
>> >>
>> >> (5) Let us know how it goes...
>> >>
>> >> Regards,
>> >> Jonathan
>> >> ___
>> >> Camping-list mailing list
>> >> Camping-list@rubyforge.org
>> >> http://rubyforge.org/mailman/listinfo/camping-list
>> >>
>> >
>> >
>> >
>> > --
>> > Dave
>> >
>>
>>
>>
>> --
>> Dave
>> ___
>> Camping-list mailing list
>> Camping-list@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/camping-list
>
>
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/

Re: Camping tutorials for education?

2009-06-10 Thread Magnus Holm
Unfornately, Camping doesn't (yet) work on Ruby 1.9.1. Unless someone
else want to try
now, I'm going to have a look at it *after* 2.0 is released.

//Magnus Holm


On Wed, Jun 10, 2009 at 22:30, David Susco  wrote:

> I've disabled SELinux to see if I could get any farther.
>
> I managed to get passenger installed and working, however a fancy
> passenger generated page is telling me the app couldn't be started due
> to this error:
>
> `require':
> /usr/local/lib/ruby/gems/1.9.1/gems/camping-1.9.316/lib/camping.rb:11:
> syntax error, unexpected tLABEL (SyntaxError)
> p[0]==?/?...@root+p:p end;def URL c='/',*a;c=R(c,...
>
> It's the same thing when I try to rackup the .ru file, and the same
> when I try to execute this little bit of code:
>
> #!/usr/bin/env ruby -rubygems
> gem 'camping', '>=1.9.316'
> %w(rack camping).each { |lib| require lib }
> puts 'done'
>
> I'm tried reinstalled camping 1.9.316 but that didn't change anything.
> Any ideas?
>
> Dave
>
> On Wed, Jun 10, 2009 at 10:39 AM, David Susco wrote:
> > I'm trying to get passenger working presently, once I do I'll let you
> > know how the rest of it goes.
> >
> > When I try to load the module in the apache conf I get the following
> error:
> >
> > Cannot load
> /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
> > into server:
> /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so:
> > failed to map segment from shared object: Permission denied
> >
> > I'm assuming it's an SELinux problem, has anyone run into it before?
> > I've done the following already, so it hasn't helped:
> >
> http://www.modrails.com/documentation/Users%20guide.html#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it
> >
> > Dave
> >
> >
> > On Tue, Jun 9, 2009 at 11:28 AM, Jonathan Groll
> wrote:
> >> Hi David,
> >>
> >> On Tue, Jun 09, 2009 at 09:29:22AM -0400, David Susco wrote:
> >>>
> >>> I'd definitely be interested in seeing any work you do with this.
> >>> Having it up on the wiki would be nice too.
> >>>
> >>> I'm still trying to figure out deployment with camping 1.5. I've
> >>> experimented with 1.9.316 and rack but have yet to get an app to work
> >>> with that. The same with Picnic.
> >>
> >> Been meaning to write a quick overview of how I did it for you (as
> >> documentation is super sparse still). Briefly:
> >>
> >> (1) Read the passenger user guide at:
> >> http://www.modrails.com/documentation/Users%20guide.html
> >>
> >> I installed passenger from a gem but see the user's guide if you need
> >> to install on debian using apt (it is in the Ubuntu repositories
> already).
> >> Similarly rack is from a gem, and I use the same version of camping as
> >> you (from Judofyr's gem server).
> >>
> >> (2) Try and get the "hello world" from the passenger user guide to
> >> work for you.
> >>
> >> (3) Then try and get the blog example working that is shipped with
> >> camping. Here is a config.ru that works for that:
> >>
> >> require 'rubygems'
> >> require 'rack'
> >> require 'camping'
> >> require 'blog'
> >> Blog::Models::Base.establish_connection :adapter => "sqlite3",
> >> :database => "/home/jonathan/.camping.db"
> >> run Blog
> >>
> >> Change the database path to one you have on your system. You may need
> >> something like:
> >> Blog::Models.create_schema :assume => (Blog::Models::Post.table_exists?
> ?
> >> 1.0 : 0.0)
> >>
> >> before "run blog" if your sqlite database doesn't yet have the schema
> >> for the blog example.
> >>
> >> (4) And the apache config that I used was something like:
> >>
> >> 
> >>  Options ExecCGI FollowSymLinks
> >> AllowOverride all
> >>Allow from all
> >> 
> >> 
> >>ServerName www.rackexample.com
> >>DocumentRoot /var/www/blog/public
> >> 
> >>
> >> You may need to edit your hosts file so that www.rackexample.com
> >> resolves to your apache server.
> >>
> >> (5) Let us know how it goes...
> >>
> >> Regards,
> >> Jonathan
> >> ___
> >> Camping-list mailing list
> >> Camping-list@rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/camping-list
> >>
> >
> >
> >
> > --
> > Dave
> >
>
>
>
> --
> Dave
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping tutorials for education?

2009-06-10 Thread David Susco
I've disabled SELinux to see if I could get any farther.

I managed to get passenger installed and working, however a fancy
passenger generated page is telling me the app couldn't be started due
to this error:

`require': 
/usr/local/lib/ruby/gems/1.9.1/gems/camping-1.9.316/lib/camping.rb:11:
syntax error, unexpected tLABEL (SyntaxError)
p[0]==?/?...@root+p:p end;def URL c='/',*a;c=R(c,...

It's the same thing when I try to rackup the .ru file, and the same
when I try to execute this little bit of code:

#!/usr/bin/env ruby -rubygems
gem 'camping', '>=1.9.316'
%w(rack camping).each { |lib| require lib }
puts 'done'

I'm tried reinstalled camping 1.9.316 but that didn't change anything.
Any ideas?

Dave

On Wed, Jun 10, 2009 at 10:39 AM, David Susco wrote:
> I'm trying to get passenger working presently, once I do I'll let you
> know how the rest of it goes.
>
> When I try to load the module in the apache conf I get the following error:
>
> Cannot load 
> /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
> into server: 
> /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so:
> failed to map segment from shared object: Permission denied
>
> I'm assuming it's an SELinux problem, has anyone run into it before?
> I've done the following already, so it hasn't helped:
> http://www.modrails.com/documentation/Users%20guide.html#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it
>
> Dave
>
>
> On Tue, Jun 9, 2009 at 11:28 AM, Jonathan Groll wrote:
>> Hi David,
>>
>> On Tue, Jun 09, 2009 at 09:29:22AM -0400, David Susco wrote:
>>>
>>> I'd definitely be interested in seeing any work you do with this.
>>> Having it up on the wiki would be nice too.
>>>
>>> I'm still trying to figure out deployment with camping 1.5. I've
>>> experimented with 1.9.316 and rack but have yet to get an app to work
>>> with that. The same with Picnic.
>>
>> Been meaning to write a quick overview of how I did it for you (as
>> documentation is super sparse still). Briefly:
>>
>> (1) Read the passenger user guide at:
>> http://www.modrails.com/documentation/Users%20guide.html
>>
>> I installed passenger from a gem but see the user's guide if you need
>> to install on debian using apt (it is in the Ubuntu repositories already).
>> Similarly rack is from a gem, and I use the same version of camping as
>> you (from Judofyr's gem server).
>>
>> (2) Try and get the "hello world" from the passenger user guide to
>> work for you.
>>
>> (3) Then try and get the blog example working that is shipped with
>> camping. Here is a config.ru that works for that:
>>
>> require 'rubygems'
>> require 'rack'
>> require 'camping'
>> require 'blog'
>> Blog::Models::Base.establish_connection :adapter => "sqlite3",
>> :database => "/home/jonathan/.camping.db"
>> run Blog
>>
>> Change the database path to one you have on your system. You may need
>> something like:
>> Blog::Models.create_schema :assume => (Blog::Models::Post.table_exists? ?
>> 1.0 : 0.0)
>>
>> before "run blog" if your sqlite database doesn't yet have the schema
>> for the blog example.
>>
>> (4) And the apache config that I used was something like:
>>
>> 
>>              Options ExecCGI FollowSymLinks
>>                 AllowOverride all
>>                    Allow from all
>> 
>> 
>>    ServerName www.rackexample.com
>>    DocumentRoot /var/www/blog/public
>> 
>>
>> You may need to edit your hosts file so that www.rackexample.com
>> resolves to your apache server.
>>
>> (5) Let us know how it goes...
>>
>> Regards,
>> Jonathan
>> ___
>> Camping-list mailing list
>> Camping-list@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/camping-list
>>
>
>
>
> --
> Dave
>



-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping tutorials for education?

2009-06-10 Thread Julik Tarkhanov


On 09 Jun 2009, at 17:47, Magnus Holm wrote:



The "current" version is 1.5 and is available from RubyForge. This  
is however a *really* old release, and there have been plenty of bug  
fixes in the repo. There's a 1.5.180 from _why's gem server which  
fixes some of them.


The 1.9-version I have at gems.judofyr.net is just a "rake gem" ran  
from the latest why/camping (once in a while). This should be stable  
enough. In fact, as soon as I finish this little cleanup of the  
documentation (and get some more feedback from you guys) I will most  
probably release it as 2.0. (1.9 is the "preview release" of 2.0)





How sad to see neglect with regards to publishing software as  
Rubyforge falls into oblivion. Magnus, this is a shame. I wrote on the  
list about it some time ago, but it was in vain so it seems.

--
Julik Tarkhanov
m...@julik.nl





___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping tutorials for education?

2009-06-10 Thread David Susco
I'm trying to get passenger working presently, once I do I'll let you
know how the rest of it goes.

When I try to load the module in the apache conf I get the following error:

Cannot load 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
into server: 
/usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so:
failed to map segment from shared object: Permission denied

I'm assuming it's an SELinux problem, has anyone run into it before?
I've done the following already, so it hasn't helped:
http://www.modrails.com/documentation/Users%20guide.html#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it

Dave


On Tue, Jun 9, 2009 at 11:28 AM, Jonathan Groll wrote:
> Hi David,
>
> On Tue, Jun 09, 2009 at 09:29:22AM -0400, David Susco wrote:
>>
>> I'd definitely be interested in seeing any work you do with this.
>> Having it up on the wiki would be nice too.
>>
>> I'm still trying to figure out deployment with camping 1.5. I've
>> experimented with 1.9.316 and rack but have yet to get an app to work
>> with that. The same with Picnic.
>
> Been meaning to write a quick overview of how I did it for you (as
> documentation is super sparse still). Briefly:
>
> (1) Read the passenger user guide at:
> http://www.modrails.com/documentation/Users%20guide.html
>
> I installed passenger from a gem but see the user's guide if you need
> to install on debian using apt (it is in the Ubuntu repositories already).
> Similarly rack is from a gem, and I use the same version of camping as
> you (from Judofyr's gem server).
>
> (2) Try and get the "hello world" from the passenger user guide to
> work for you.
>
> (3) Then try and get the blog example working that is shipped with
> camping. Here is a config.ru that works for that:
>
> require 'rubygems'
> require 'rack'
> require 'camping'
> require 'blog'
> Blog::Models::Base.establish_connection :adapter => "sqlite3",
> :database => "/home/jonathan/.camping.db"
> run Blog
>
> Change the database path to one you have on your system. You may need
> something like:
> Blog::Models.create_schema :assume => (Blog::Models::Post.table_exists? ?
> 1.0 : 0.0)
>
> before "run blog" if your sqlite database doesn't yet have the schema
> for the blog example.
>
> (4) And the apache config that I used was something like:
>
> 
>              Options ExecCGI FollowSymLinks
>                 AllowOverride all
>                    Allow from all
> 
> 
>    ServerName www.rackexample.com
>    DocumentRoot /var/www/blog/public
> 
>
> You may need to edit your hosts file so that www.rackexample.com
> resolves to your apache server.
>
> (5) Let us know how it goes...
>
> Regards,
> Jonathan
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping tutorials for education?

2009-06-09 Thread Magnus Holm
2. Stable version
The "current" version is 1.5 and is available from RubyForge. This is
however a *really* old release, and there have been plenty of bug fixes in
the repo. There's a 1.5.180 from _why's gem server which fixes some of them.

The 1.9-version I have at gems.judofyr.net is just a "rake gem" ran from the
latest why/camping (once in a while). This should be stable enough. In fact,
as soon as I finish this little cleanup of the documentation (and get some
more feedback from you guys) I will most probably release it as 2.0. (1.9 is
the "preview release" of 2.0)

3. Rack

Camping started depending on Rack when the work on 2.0 started. Right now,
Camping uses Rack::Utils so it's currently not possible to run Camping
without Rack. This should hopefully not cause any problems.

4. Servers

At the moment I think the easiest solution is Phusion Passenger, which is an
Apache or Nginx modules which can serve any Rack app.

5. Documentation

Yes, we really need some documentation! This is actually what's blocking the
2.0 release. I have some
suggestions (will try to post these as soon as possible, aka few
hours). I'm not very god writing documentation, so if you want to help
out we
can agree on how to organize it.

6. Picnic

While I haven't been to take a proper look at it, I think it's a very cool
idea. Keep up the good work :-)

//Magnus Holm


On Tue, Jun 9, 2009 at 12:35, Dave Everitt  wrote:

> I'm planning to use Camping to teach the basics of frameworks, and
> encourage new arrivals from web design to take up Ruby instead of (say)
> defaulting to PHP. To do this, I need a foolproof set of instructions for
> both the technicians (who have to install on all the studio machines) and
> the students.
>
> To go further, I'd like to get an opinion on the following:
>
> 1. SQLIte/ActiveRecord
> I've had some trouble getting Camping to write to an SQLite database as it
> should (post 'sqlite3 connection problem' has the details). To prepare
> instructions, I need to understand exactly why this is happening (in case it
> happens on a student's machine), so I'll persist and get it solved, somehow.
>
> 2. Obtaining the definitive current stable version
> What's the consensus on the definitive stable version? And where is it? The
> bleeding edge download from http://gems.judofyr.net/ is at 1.9.316, yet
> Picnic includes Camping 2.0 (which I thought didn't exist yet), but if I
> 'gem update' my 1.5 version, Camping remains at 1.5? I hope you can
> understand the confusion (on behalf of my future students) here.
>
> 3. Rack
> At which version (see [2]) did Camping start depending on Rack (as stated
> at: http://github.com/why/camping/tree/master)? Just out of interest, is
> it still possible to run a Camping app without it?
>
> 4. Comparing servers
> Is there any consensus on running Camping with: Apache, Mongrel, fast_cgi,
> plain old CGI, etc.? Which is the most efficient, future-proof,
> quickest/easiest to set up, and is there any information that charts the
> methods and differences? In a production environment, the URLs are obviously
> an issue here, so some mod_rewrite (or -like) examples would also be good.
>
> With all this I also want to lower the entry bar to Camping for new users
> by attempting some nice, simple documentation just to get people going,
> which is the thing I've been struggling to do myself.
>
> Dave
>
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Camping tutorials for education?

2009-06-09 Thread Dave Everitt
sounds like a work in progress, then... I'll stick with 1.5 until  
there's a definitive stable higher number (opinions?). Just need to  
solve the sqlite3 issue.


Anyone know what setup the 'cheat' Camping app uses (which I like,  
contribute to and use): http://cheat.errtheblog.com ? Working live  
examples are a good start.


I still need some specific answers to the original points so I can  
make up a working setup just for beginners to get going, so any  
precise feedback there would be welcome - no hurry.


My short-term aim is just(!) to get the blog example working in  
Camping 1.5 with sqlite3 on OS X with Ruby 1.8.6, as a CGI.


The bottom line is, I love the whole concept of Camping, and want to  
help people new to web development (often from a design background,  
and in my case, students) start using it.


I'd definitely be interested in seeing any work you do with this.  
Having it up on the wiki would be nice too.


I'm still trying to figure out deployment with camping 1.5. I've  
experimented with 1.9.316 and rack but have yet to get an app to  
work with that. The same with Picnic.


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping tutorials for education?

2009-06-09 Thread Jonathan Groll

Hi David,

On Tue, Jun 09, 2009 at 09:29:22AM -0400, David Susco wrote:

I'd definitely be interested in seeing any work you do with this.
Having it up on the wiki would be nice too.

I'm still trying to figure out deployment with camping 1.5. I've
experimented with 1.9.316 and rack but have yet to get an app to work
with that. The same with Picnic.


Been meaning to write a quick overview of how I did it for you (as
documentation is super sparse still). Briefly:

(1) Read the passenger user guide at:
http://www.modrails.com/documentation/Users%20guide.html

I installed passenger from a gem but see the user's guide if you need
to install on debian using apt (it is in the Ubuntu repositories already).
Similarly rack is from a gem, and I use the same version of camping as
you (from Judofyr's gem server).

(2) Try and get the "hello world" from the passenger user guide to
work for you.

(3) Then try and get the blog example working that is shipped with
camping. Here is a config.ru that works for that:

require 'rubygems'
require 'rack'
require 'camping'
require 'blog'
Blog::Models::Base.establish_connection :adapter => "sqlite3",
:database => "/home/jonathan/.camping.db"
run Blog

Change the database path to one you have on your system. You may need
something like:
Blog::Models.create_schema :assume => (Blog::Models::Post.table_exists? ? 1.0 : 
0.0)

before "run blog" if your sqlite database doesn't yet have the schema
for the blog example.

(4) And the apache config that I used was something like:


  Options ExecCGI FollowSymLinks
 AllowOverride all
Allow from all


ServerName www.rackexample.com
DocumentRoot /var/www/blog/public


You may need to edit your hosts file so that www.rackexample.com
resolves to your apache server.

(5) Let us know how it goes...

Regards,
Jonathan
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list


Re: Camping tutorials for education?

2009-06-09 Thread David Susco
I'd definitely be interested in seeing any work you do with this.
Having it up on the wiki would be nice too.

I'm still trying to figure out deployment with camping 1.5. I've
experimented with 1.9.316 and rack but have yet to get an app to work
with that. The same with Picnic.

Dave

On Tue, Jun 9, 2009 at 6:35 AM, Dave Everitt wrote:
> I'm planning to use Camping to teach the basics of frameworks, and encourage
> new arrivals from web design to take up Ruby instead of (say) defaulting to
> PHP. To do this, I need a foolproof set of instructions for both the
> technicians (who have to install on all the studio machines) and the
> students.
>
> To go further, I'd like to get an opinion on the following:
>
> 1. SQLIte/ActiveRecord
> I've had some trouble getting Camping to write to an SQLite database as it
> should (post 'sqlite3 connection problem' has the details). To prepare
> instructions, I need to understand exactly why this is happening (in case it
> happens on a student's machine), so I'll persist and get it solved, somehow.
>
> 2. Obtaining the definitive current stable version
> What's the consensus on the definitive stable version? And where is it? The
> bleeding edge download from http://gems.judofyr.net/ is at 1.9.316, yet
> Picnic includes Camping 2.0 (which I thought didn't exist yet), but if I
> 'gem update' my 1.5 version, Camping remains at 1.5? I hope you can
> understand the confusion (on behalf of my future students) here.
>
> 3. Rack
> At which version (see [2]) did Camping start depending on Rack (as stated
> at: http://github.com/why/camping/tree/master)? Just out of interest, is it
> still possible to run a Camping app without it?
>
> 4. Comparing servers
> Is there any consensus on running Camping with: Apache, Mongrel, fast_cgi,
> plain old CGI, etc.? Which is the most efficient, future-proof,
> quickest/easiest to set up, and is there any information that charts the
> methods and differences? In a production environment, the URLs are obviously
> an issue here, so some mod_rewrite (or -like) examples would also be good.
>
> With all this I also want to lower the entry bar to Camping for new users by
> attempting some nice, simple documentation just to get people going, which
> is the thing I've been struggling to do myself.
>
> Dave
>
> ___
> Camping-list mailing list
> Camping-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>



-- 
Dave
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list