Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
rails upgrade missing 'truncate'
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
schmii  
View profile  
 More options Jan 7, 9:32 pm
From: schmii <schmi...@gmail.com>
Date: Wed, 7 Jan 2009 18:32:14 -0800 (PST)
Local: Wed, Jan 7 2009 9:32 pm
Subject: rails upgrade missing 'truncate'
is anyone aware if something had changed in the past couple of days on
dreamhost accounts running rails?
it seems the server crashed every time it encountered 'truncate' in
any of my views as in:

ActionView::TemplateError (undefined method `length' for
#<Enumerable::Enumerato
r:0x2b4614ca23c8>) on line #28 of businesses/list.rhtml:

28:     <td><%= h(truncate(business.address, 15)) %></td>

when checked the present Rails version is 2.1.1

I've manually gone through and edited out each offending lines and it
seems
to work.
if this is just due to a rails upgrade thats got to suck

schmii


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Palmblad  
View profile  
 More options Jan 7, 10:30 pm
From: "Adam Palmblad" <apalmb...@gmail.com>
Date: Wed, 7 Jan 2009 19:30:23 -0800
Local: Wed, Jan 7 2009 10:30 pm
Subject: Re: [vanrb] rails upgrade missing 'truncate'

I'd strongly recommend vendoring *at least* your version of rails so that
won't happen again, if that's the problem.

Run:
rake rails:freeze:edge RELEASE=2.1.1
in the root directory of your application.

That way, you control a copy of rails with your application, no need to
worry about what's installed on the server.

That being said, truncate shouldn't just break - are you sure
business.address is a string?

-Adam


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
schmii  
View profile  
 More options Jan 7, 11:24 pm
From: schmii <schmi...@gmail.com>
Date: Wed, 7 Jan 2009 20:24:59 -0800 (PST)
Local: Wed, Jan 7 2009 11:24 pm
Subject: Re: rails upgrade missing 'truncate'
thanks Adam for the quick response. I'll try freezing my versions for
future protection. But isn't their a limit on the age of rails
supported?

business.address is a string:
by changing
28:     <td><%= h(truncate(business.address, 15)) %></td>
to
28:     <td><%= h(business.address) %></td>
works as expected

so is the 'truncate' function deprecated?

thanks
schmii

On Jan 7, 7:30 pm, "Adam Palmblad" <apalmb...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Palmblad  
View profile  
 More options Jan 8, 3:57 pm
From: "Adam Palmblad" <apalmb...@gmail.com>
Date: Thu, 8 Jan 2009 12:57:31 -0800
Local: Thurs, Jan 8 2009 3:57 pm
Subject: Re: [vanrb] Re: rails upgrade missing 'truncate'

There may be a cutoff for support, but IMO it's much better to have your app
not break.  You can upgrade your vendored rails  periodically - and then
check your tests and whatever else you do to ensure that things keep
running.  It's much easier to debug a problem right after you've upgraded
yourself, instead of after you've deployed and you aren't sure what's
happening.

-Adam


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
schmii  
View profile  
 More options Jan 8, 11:11 pm
From: schmii <schmi...@gmail.com>
Date: Thu, 8 Jan 2009 20:11:02 -0800 (PST)
Local: Thurs, Jan 8 2009 11:11 pm
Subject: Re: rails upgrade missing 'truncate'
it just keeps getting worse.
After methodically editing-out each of the offending lines it seems to
have worked up until today when:
passenger reports: Ruby on Rails version '2.0.2' not found
now when checked dreamhost Rails version now reports 2.2.2.
curious why it didn't complain at Rails version 2.1.1

I tried changing the environment.rb file:
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
but have yet to track down the next subsequent error.

how many rails version changes does it take to host a website. I know
I should have used rails freeze:edge but it was working at that point.
is this the experimental nature of Rails? maybe not fit for business
applications.

gerhard

On Jan 8, 12:57 pm, "Adam Palmblad" <apalmb...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
schmii  
View profile  
 More options Jan 9, 7:06 pm
From: schmii <schmi...@gmail.com>
Date: Fri, 9 Jan 2009 16:06:54 -0800 (PST)
Local: Fri, Jan 9 2009 7:06 pm
Subject: Re: rails upgrade missing 'truncate'
for me freezing anything in vendor
  - rake rails:freeze:edge RELEASE=2.1.1
  - rake rails:freeze:edge RELEASE=2.0.2

gives me the error message:

/Users/schmii/NetBeansProjects/Apartment4/vendor/rails/railties/lib/
initializer.rb:152:in `install_gem_spec_stubs': undefined method
`vendor_rails?' for Rails:Module (NoMethodError)

I've changed environment.rb file the to match:
  RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION

the only way I can get my locahost working is to trash the vendor
directory.
sofar nothing works on my dreamHost account

just curious on my localhost platform
  rails -v reports 2.1.1

yet my environment.rb file contains:
  RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
and it works?

any tips would be appreciated
gerhard

On Jan 8, 8:11 pm, schmii <schmi...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google