Re: On Vacation and Don't have my Rails Books...help on FIND?

2008-03-26 Thread Kevin Triplett

Hi Kathleen and welcome,

The Account.find_by_code must be returning a nil, hence the 
complaint about using .first method on it.

But I'm wondering if you should write it as:

@account = Account.find_by_code(row[3]).first if row[3]

The find_by_code IIUC does the conditional for you, hence 
the strange resulting SQL statement when specifying what 
Rails probably considers an additional conditional.

Good luck, sorry for the delay!

Kevin

[EMAIL PROTECTED] wrote:
> Normally, I would post this to the Rails forum but Heroku is my new
> love and I thought maybe I'd meet some people there...so here goes.
> I am trying to perform a FIND method against a lookup table and am
> being hexed?
> I've written a few large Rails applications and seem to be going round
> and round with this, and thought I'd see about some help.
> 
> I am reading records into a migration using FasterCSV and have used
> this successfully many times. This time, I'm trying to exercise this
> logic;
> 
> I read the ASSET .csv record with the ambition of converting the
> 'asset.code' incoming field into the unique id ( account_id) of the
> ACCOUNT lookup table that will become asset.account_id.
> I am certain that the ACCOUNT table is healthy and has a account.code
> string = 1002.
> 
> Here I read the lookup table;
> @account = Account.find_by_code(:conditions => ['code = ?',
> row[3]]).first  unless row[3].nil?
> 
> this is the development log line that shows what happened;
> 
> SELECT * FROM `accounts` WHERE (`accounts`.`code` IS NULL) AND (code =
> '1002') LIMIT 1
> I am getting the error message that .first method can't be performed
> against a NULL object. Also, I have no idea why MySQL is performing a
> NULL AND (my request) in the resulting statement.
> I've got to do a lot of these 'lookups' in my conversion and must
> transcend this problem.
> I am grateful for any help.
> Kathleen
> 
> > 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



No new folder option in root folder

2008-03-26 Thread ab5tract

Though this might be random enough not to bother with, there is no way
to make a new folder in the root folder, something that Cells
requires, and which may be useful for other people as well. It's not
such a big deal, as long as I can successfully add that folder using
git, but I just thought you might like to know.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: Heroku API Problem

2008-03-26 Thread Kelsin

On Mar 17, 12:33 pm, shammond42 <[EMAIL PROTECTED]> wrote:
> fatal: '/userapps/4867':unabletochdiror not a git archive
> fatal: The remote end hung up unexpectedly
> fetch-pack from '[EMAIL PROTECTED]:cavcomcon.git' failed

I'm getting the same problem. List works fine, key is setup (had an
error with permission denied before and solved it [was just an issue
with my default key not being id_rsa]), only when I try to clone I get
that message. I have removed the .heroku folder just in case and
generated a new key as well.

Thanks,
Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



hpricot, acts_as_ferret

2008-03-26 Thread Adam Wiggins

We're still working on a permanent solution to the
gems-with-C-extensions problem, but in the meantime I've installed
some of the most commonly requested gems by default:

- ferret and acts_as_ferret
- hpricot
- rmagick (as before)

Let me know if you have other C extension gem installation requests.

Adam

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: 502 Bad Gateway

2008-03-26 Thread ab5tract

Nevermind, whatever it was corrected itself. Who *hearts* Heroku? I
do!

On Mar 26, 8:18 pm, ab5tract <[EMAIL PROTECTED]> wrote:
> I'm getting "502 Bad Gateway" when trying to edit my app. This may or
> may not be because of my impatiently clicking the >> button before
> 'save' wasn't highlighted anymore.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



502 Bad Gateway

2008-03-26 Thread ab5tract

I'm getting "502 Bad Gateway" when trying to edit my app. This may or
may not be because of my impatiently clicking the >> button before
'save' wasn't highlighted anymore.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: Can't get application back to development mode

2008-03-26 Thread Orion Henry
See if thats working now for you...

On Wed, Mar 26, 2008 at 5:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

>
> Maybe the problem is difficult to solve but i need if its possible to
> put my app in development as soon as possible.
> I have to make some important changes and fix some problems.
>
> In the settings tab the development radio button is useless (no AJAX
> call like public/private radiobuttons). I tried to put my app in
> development but it was impossible.
>
> Thank's so much!
>
> (In the other hand, the app is running really fast in production!!)
>
> On 24 mar, 19:05, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > I hagve the same problem. When I switch to develoment mode nothing is
> > happening. If I try to make the POST call manualy with the param
> > _app[production]=false it doesn't work neither.
> >
> > I hope it will work soon!
> >
> > Pau (http://whatajong.heroku.com)
> >
> > On 23 mar, 03:13, "caffo (rodrigo franco)" <[EMAIL PROTECTED]> wrote:
> >
> > > Hey Heroku Team,
> >
> > > Im trying to get my application out of production to do some code
> > > changes, but I cant get it working. Can you please take  look on it?
> > > My application is 'bookqueue'.
> >
> > > Best regards, heroku rox :)
> >
> > > --
> > > Rodrigo Franco (Caffo)http://caffo.chaosnet.org/
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: Can't get application back to development mode

2008-03-26 Thread [EMAIL PROTECTED]

Maybe the problem is difficult to solve but i need if its possible to
put my app in development as soon as possible.
I have to make some important changes and fix some problems.

In the settings tab the development radio button is useless (no AJAX
call like public/private radiobuttons). I tried to put my app in
development but it was impossible.

Thank's so much!

(In the other hand, the app is running really fast in production!!)

On 24 mar, 19:05, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I hagve the same problem. When I switch to develoment mode nothing is
> happening. If I try to make the POST call manualy with the param
> _app[production]=false it doesn't work neither.
>
> I hope it will work soon!
>
> Pau (http://whatajong.heroku.com)
>
> On 23 mar, 03:13, "caffo (rodrigo franco)" <[EMAIL PROTECTED]> wrote:
>
> > Hey Heroku Team,
>
> > Im trying to get my application out of production to do some code
> > changes, but I cant get it working. Can you please take  look on it?
> > My application is 'bookqueue'.
>
> > Best regards, heroku rox :)
>
> > --
> > Rodrigo Franco (Caffo)http://caffo.chaosnet.org/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: Quick question

2008-03-26 Thread Adam Wiggins

You can check this stuff directly by doing `ruby -v` or `rails -v` in
your app's console.

Adam

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



urlnames plugin

2008-03-26 Thread Philipp Stangl

Hi all!

I'm using the acts_as_urlnameable plugin and the plugin-and-gems page
tells me that it is installed on my app in heroku and I can see all
the methods for the plugin in the console (when I type Model.methods).
The way I'm using it, works perfectly fine on my local machine!

I use template.urlname which should return the urlname of the template
- I checked the data in the database a hundred times - the ids are
correct - but still the method returns nil.

Does anyone have any ideas?

Thanks!
Philipp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Re: rails n00b question: is this a good way to serve XHTML?

2008-03-26 Thread ab5tract

I too would like to know the answer to this. It seems bizarre to me
that xhtml is not the default, as is.

On Mar 25, 5:17 pm, Eric Johnson <[EMAIL PROTECTED]> wrote:
> I'm trying to server XHTML from a rails app.  (The next step will be
> to embed some SVG).  The code below seems to work.  (You can see the
> rather trivial output athttp://aikoids.heroku.com/circle/test1.xhtml
> ).
>
> Is the way I'm doing this OK, or will I regret it later?
>
> If this does make sense, would it be possible to support syntax
> coloring for .xhtml.erb files in the Heroku editor?  Or should I just
> be naming my files ".xml"?  Or???
>
> Thanks!!
>
> --- view code ---
> --- (just a hardcoded test -- eventually I'll generate the XML)
> ---
>
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
> dir="ltr">
>   
> Test1
>   
>   
> Test1
>   I am a frog
>   
> 
>
> -- controller code 
> -- (manually setting the header type) --
>
> def test1
> headers["Content-Type"] = "application/xhtml+xml"
> end
>
>  and an extra routing rule -
>  (to support the URL "circle/test1.xhtml")
>
> map.connect ':controller/:action.:format'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---



Compatability

2008-03-26 Thread ab5tract

First off I want to say how amazing Heroku is! After all the shit I
was going through trying to get a little server-share up and running
with Rails, the ability to code it all in a browser and deploy in real
time is... unbeatable. However, I am running into issues with Rails
that make it a non-starter for me. Are there any plans in the future
to enable deployment in other frameworks such as Ramaze or Waves? This
would definitely move Heroku from 'unbeatable' to 'indispensable' in
my ebook.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~--~~~~--~~--~--~---