Eric | 1 Nov 01:52 2009
Picon

Re: Ruby QR code decoder?


i don't mean to be a jerk, but "asap?" really?

http://www.ruby-forum.com/topic/198410

-eric

On Oct 31, 3:17 pm, ckundo <cku...@...> wrote:
> I'd like to use be able to decode QR codes that people submit to my
> rails app. I'm using phonegap for iPhone, so I need to create a work-
> around for a native QR code reader. The best I can come up with is
> having someone take a picture of the code and submit it, then have
> ruby parse it.*
>
> I've searched this forum and online, and all I can find is the zxing
> library for Java. Question is:
>
> a) is there a rails plugin or a ruby gem that can decode a qr code
> image
> or b) is it possible to run a java command from ruby?
>
> Thanks for any guidance.
>
> Cameron
>
> *yes, I will be looking into obj-c eventually, but want to prototype
> asap
Rick | 1 Nov 03:49 2009
Picon

Re: Helper in controller undefined when called


Helper methods are used in the template class (ActionView::Template),
not controllers.  If I'm reading the documentation right, putting
"helper :all" in a controller makes all helpers found in app/helpers/
**/*rb available in that controller's views.

On Oct 31, 3:48 pm, Great John <rails-mailing-l...@...>
wrote:
> Hello, I'm pulling my hair out as I can't seem to find resolution to my
> simple problem, which is calling methods from controllers to helpers.
>
> in my application_controller.rb I have helper :all, which as i
> understand should include all helpers all the time.
> Then when i try to call methods in helpers i get undefined method error.
>
> Is there another place where i have to include helpers to make them
> available in controllers?
> --
> Posted viahttp://www.ruby-forum.com/.
eduardopa | 1 Nov 05:59 2009
Picon

/usr/local/bin


Hi,

I am following the hivelogic article to compile ruby on snow leopard.
http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/

It says to set the path of the terminal to:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:
$PATH"

Until this part is fine.  The problem is that when I continue creating
the folder:
mkdir ~/src

it creates the folder in my personal folder instead of /usr/local/bin

What I am doing wrong?
Hassan Schroeder | 1 Nov 06:20 2009
Picon

Re: /usr/local/bin


On Sat, Oct 31, 2009 at 9:59 PM, eduardopa <eduardopa@...> wrote:

> Until this part is fine.  The problem is that when I continue creating
> the folder:
> mkdir ~/src
>
> it creates the folder in my personal folder instead of /usr/local/bin

The ~ character represents your home directory, so that's exactly
what you're asking for.

> What I am doing wrong?

Why do you think there's something wrong?

--

-- 
Hassan Schroeder ------------------------ hassan.schroeder@...
twitter:  <at> hassan

Marnen Laibow-Koser | 1 Nov 09:19 2009
Picon

Re: /usr/local/bin


eduardopa wrote:
> Hi,
> 
> I am following the hivelogic article to compile ruby on snow leopard.
> http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/

Do you have a particular reason for wanting to do it this way?  If not, 
then forget about Hivelogic and use Apple's Ruby.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@...
--

-- 
Posted via http://www.ruby-forum.com/.

Tor Erik Linnerud | 1 Nov 14:29 2009
Picon

Re: has_many :through another has_many :through


The most excellent nested has_many though lets you do what you want.

http://github.com/ianwhite/nested_has_many_through

best regards,
Tor Erik Linnerud
http://tel.jklm.no/
--

-- 
Posted via http://www.ruby-forum.com/.

NewMonarch | 1 Nov 15:09 2009
Picon

Getting blank 404.html and 500.html pages


Hey guys.  I've a pretty experienced Rails developer, but I've never
seen this one before.  I'm not getting my custom error pages to serve
up under Passenger.  They worked just fine in an earlier version of my
app, but somewhere along the way, they stopped working.  Instead, I'm
just seeing a blank white screen with no content.  There's nothing in
the logs that indicates what's going on.

Any ideas on how to debug?  Thanks!
Saravanan Krishnan | 1 Nov 15:15 2009
Picon

Re: How to disable a item of select box


Brijesh Shah wrote:
> Hi
> 
> I want to disable only one item of select box.
> 
> I tried to used :disabled=>'item' but it disable select box itself.
> 
> So anybody how to do this?
> 
> Thanks
> Brijesh Shah

Hi Brijesh,

I hope the following example would help you.. If not put your code 
here..

Example:

  select("post", "category", Post::CATEGORIES, {:disabled => 
'restricted'})

could become:

  <select name="post[category]">
    <option></option>
    <option>joke</option>
    <option>poem</option>
    <option disabled="disabled">restricted</option>
(Continue reading)

Saravanan Krishnan | 1 Nov 15:27 2009
Picon

Re: Your Ruby IDE


Why dont you go for SciTE editor. It is simple and powerful
--

-- 
Posted via http://www.ruby-forum.com/.

Colin Law | 1 Nov 15:27 2009

Re: Getting blank 404.html and 500.html pages


2009/11/1 NewMonarch <jscrawford@...>:
>
> Hey guys.  I've a pretty experienced Rails developer, but I've never
> seen this one before.  I'm not getting my custom error pages to serve
> up under Passenger.  They worked just fine in an earlier version of my
> app, but somewhere along the way, they stopped working.  Instead, I'm
> just seeing a blank white screen with no content.  There's nothing in
> the logs that indicates what's going on.

Have you tried viewing the source in the the browser (View, Page
source or similar) to see if there is something being sent that is not
displayed for some reason such as invalid html.

Also you could revert back to previous versions of the app till they
work again and see what was changed.

Colin

>
> Any ideas on how to debug?  Thanks!
> >
>


Gmane