Lázaro | 3 May 2013 16:12

some pitfails

Hi, I have two probelms

run camping someapp.rb other.rb

and it do not mount both of hims, only the first one

second

something.rb
something/
   models.rb
   views.rb
   controllers.rb

cat something.rb

require 'camping'
Camping.goes :Something

module Something
end

And it do not get the views and controllers as dependency

What I doing wrong?
Jenna Fox | 21 Apr 2013 03:13
Gravatar

Raspberry Pi colocation for free!

PCextreme are offering free raspberry pi colocation on a 100mbit link (the max speed of the pi's ethernet port) with 500gb of ipv6 and ipv6 traffic per month, guaranteeing the service for at least 12 months with no intent to shut it down in the future or start charging. They're doing it because the costs are so low (they don't use much power or make much heat) and it's a fun project for them!

The only cost is that you must supply your own Raspberry Pi, with an SD card and an OS installed, and it must be in a plastic case, so all up it costs about $60 (pi $40, case $10, sd card about $10). The raspberry pi system specs are roughly 1ghz arm processor with 512mb of ram, however many gigabytes SD card of storage, and a GPU capable of decoding and encoding h264 video.

Ruby 1.9.3 and camping run great on a raspberry pi with the popular Raspbian OS, so if you're looking for a cheap way to get in to learning web tech, this seems like a fantastic offer. I'm really keen to try it out!

http://raspberrycolocation.com/home/

Isn't that neat? Anyone have any cool ideas for what we can do with this stuff?

Jenna Fox

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Francois Sery | 29 Mar 2013 14:58
Picon

charset for french words

bonjour,
 i can't display french é ,ê, or à...
 how do i modify the charset of my app ? thanks

François
_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
curtis bissonnette | 28 Mar 2013 19:36
Picon
Gravatar

Add Rake Middleware

Is there a simple way to add some Rake middleware to the camping server?  Specifically I'm hoping to include sass and coffee-script support server side.
_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Francois Sery | 28 Mar 2013 14:01
Picon

emails from my camping app

Hello,
i'm looking for a gem to send emails from my camping app.
Advices and code examples are welcome.Thanks.

François
_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Francois Sery | 27 Mar 2013 07:33
Picon

unit testing for the first time

Bonjour,
how can i unit test the methods from my module App:helpers ?
 i'm new to ruby and to unit testing , english is not my mother tongue. All that i know come from

http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing

and

M R . N E I G H B O R L Y ' S
HUMBLE LITTLE
RUBY BOOK

i 've tried this, but i don't know how to reference the  helpers in my app.

require 'test/unit'
require 'app.rb'  # this doesn't work

class Test_helpers < Test::Unit::TestCase
    def test_extraire_lieu
        assert_equal ("ici", App::Helpers.test_extraire_lieu({lieu=>"ici", bla => 'xxx', ble => 'xxxx'}))
    end
end

thanks



_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Francois Sery | 22 Mar 2013 14:16
Picon

modify the way active record Pluralize/singularize

hello, i'm new to Camping and i dont speek english very well so , please, forgive my mistakes...here is my question:
 i want to modify the way active record Pluralize/singularize my tables names.

i have 2 classes:

module Todo::models
class Tache <Base
belongs_to :categorie
end

class Categorie< Base
 has_many :taches
end
end

"tache" and "categorie" are french words. their plural form are  "taches" and "categories ".

when i write:
...
maCategorie=Categorie.create(:nom => categorie)
maCategorie.taches.create(:nom => nomPropre)
...

I  have an "unitialized constant Todo::Models::Categorie::Tach" error message.
 
i think  activerecord infers that the singular for "taches" is "tach" instead of "tache". or maybe it's something else.
any idea ?

thanks

François


_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
curtis bissonnette | 21 Mar 2013 01:57
Picon
Gravatar

Mab::Mixin::Error at /

I'm doing something stupid I know... I just started using camping and it looks great...except none of the examples run.  Any view that uses MAB throws the following error:

Mab::Mixin::Error at / This tag is already closed

I'm copying the examples right out of the book, I've tried ruby 1.9.3 and 2.0.0 with the 2.1.531 gem.  Maybe there was a change to the code and the documentation is a little behind?  Any help would be appreciated.

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Brett Chalupa | 1 Feb 2013 05:14
Picon

Just Saying Hello

Hi all,

My name is Brett, and I have been using Camping for about three months for personal projects. I really enjoy working with Camping, and I want to do all that I can to help! Just saying hello. :)

Cheers,
_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Koaps Freeman | 2 Jan 2013 19:02
Picon

Apache Passenger and Reloader

Hi Guys,

I just started playing with camping and so far it's pretty awesomo.

After much messing around I was finally able to get Apache Passenger, Camping and ActiveRecord to PostgreSQL working.

One thing I was wondering about, can I use reloader with Apache Passenger?

Always having to touch/rm a tmp/restart.txt to see changes or reloading apache altogether is kinda a pain and I was hoping I can use reloader to just detect changes to make recovering from errors faster as I type code.

I saw some previous post about using reloader:

http://rubyforge.org/pipermail/camping-list/2010-August/001378.html

Which used on_reload which doesn't seem to exist anymore.

I'm still learning rack/rails stuff so not really sure how to setup my config.ru to use reloader.

In the reference it says:

require 'camping/reloader' reloader = Camping::Reloader.new('/path/to/yourapp.rb') blog = reloader.apps[:Blog]

The blog object will behave exactly like your Blog and Wiki, but they will update themselves if yourapp.rb changes.
I'm not sure how I get passenger to then run the blog from the config.ru

Thanks

_______________________________________________
Camping-list mailing list
Camping-list@...
http://rubyforge.org/mailman/listinfo/camping-list
Alex Weisberger | 18 Dec 2012 21:37
Picon

New to camping-list, and a problem mounting files to a server

Hi to everybody,

My name is Alex and I'm new to the Camping mailing list, as well as Camping itself. I have to say, I think this is an awesome project and it is exactly what I'm looking for right now. Something fun to experiment with.

Getting a server up and running was very easy, but of course I've hit a road block: Any file that I'm referring to in the layout does not mount on the server. For example,

I have a very simple app to illustrate this, which has one controller that simply renders a function named pageFunc:

  def pageFunc
    img :src => 'labelnegate.jpg'
  end

labelnegate.jpg is in the same directory as the app, but the image does not show. The terminal that I launched the camping server in shows:
 
  127.0.0.1 - - [18/Dec/2012 16:19:19] "GET /labelnegate.jpg HTTP/1.1" 404 60 0.0146

which is obviously showing a 404 error.

Strange indeed. Now I'm not looking for a flat out answer to this problem per se, I'd actually prefer someone to just give me a nudge in the right direction. I've been browsing the camping-unabridged.rb source, but I can't seem to find where or how local files are mounted to the server. Or is that actually Rack's responsibility?

Also, I didn't include the full source of the app because I don't know if you guys have code formatting guidelines, so I thought one small function would be acceptable in this case. If you could tell me what (if any) formatting guidelines you have, I will surely respect those in the future.

I appreciate any replies.

Thanks a lot,
-Alex

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

Gmane