Displaying 20 results from an estimated 400 matches similar to: "Convert bytes to kb or mb in words"
2006 Jun 21
7
Mongrel 0.3.13.1 -- Quick Small Fixes
Hi Everyone,
This is a small release that fixes a little bug, some of the
documentation, and adds the new RedirectHandler code and a @redirect@
call for the mongrel.conf files. It''s fresh so don''t rely on it.
Everyone should upgrade with the usual *gem update* command (which tells
you it''s "Upgrading...") and tell me how it works.
This release fixes:
* The
2006 Jun 12
15
Mongrel Now Recommended Setup?
I see that the RubyOnRails.com site has migrated to Mongrel with Apache as a
front-end proxy.
Is that now the/a recommended setup for Rails apps? We''re still using FCGI
but I''m always interested to learn more about other folk''s successful
deployment choices.
Across all of our sites we''re pumping out about 300k pages per day so
anything that saves memory or has
2006 Jun 12
2
starting WEBrick
I''m doing some testing and want to start WEBrick as a daemon on my RHEL 4
server. How can I start this to run as a daemon from the command line so
that I can close my ssh session and leave WEBrick running?
Thanks,
David
2006 Nov 14
16
memory issues -- mongrel part of the problem?
Hi. I''m a fairly new mongrel user and have a scenario that I wanted
to run by you all, see if anyone''s synapses connect -- mine def.
aren''t!
I''m running a fairly simple rails app through a mongrel cluster (2
mongrels). This site is consistently sloooow -- memory on the server
is regularly paging (and shouldn''t be). ssh-ing in and running top
shows
2006 Jun 30
4
Serious noob question. Any help would be great
Hi All,
I''m working on building an app that can log and edit phone call
information. I''ve got the creating and editing parting working great,
and I''ve started an attempt to add searching. I can''t seem to figure
out how to get an [:id] parameter from a form and passed between two
controller methods. Right now I have a web page with a single text
field in it
2006 May 28
14
Lightbox and RJS
Hi,
I am trying to include lightbox functionality in my app, but there is
a slight complication. Apparently lightbox initializes all the links
to lightbox events on page load. However, in my case, some new links
to lightbox events will be rendered to the page through ajax events
(obviously this means after the page loads). So I figure I need to
find a way to call lightbox''s
2009 Jul 24
7
number_to_currency not working since 2.1.1
Back in 2.1.1 everything was sweet:
Loading development environment (Rails 2.3.3)
>> include ActionView::Helpers::NumberHelper
=> Object
>> number_to_currency(12.3)
>> "$12.30"
Then I upgraded to 2.3.2 and:
Loading development environment (Rails 2.3.3)
>> include ActionView::Helpers::NumberHelper
=> Object
>> number_to_currency(12.3)
>> 12.3
2006 Jun 06
11
Instant Rails speed on my puter..
Hi.
I''ve installed Instant Rails, and when testing my rails apps, I''m
noticing the load time is quite noticable.
I''m concerned when I convert to real produciton, going live, if there''s
going to be the same delay, plus additional bandwith traveling time.
I am running on a pentium 4..
Insights on speed..
Thanks
Dominic Son
--
Posted via
2006 Feb 23
6
irb with rails
I was trying to access rails functions (number_with_precision) from an
irb session.
It can''t find the method. How do I load the libraries ?
TIA
LS
--
Posted via http://www.ruby-forum.com/.
2009 Aug 03
5
Decimal datatype and trailing zeros
Hello
I''ve encountered a little problem with zeros using the decimal data
type
Specifying a scale of 3 and inserting a number with 3 zeros after the
point (for example 12345.000) it gets correctly stored in the
database, but rails insists to show me the number only with the first
zero after the point (12345.0)
There is a way to tell rails to not truncate at the first zero?
2006 Jul 23
6
how do you give focus to a form field?
When you put up a page with a form on it and the top item is a text
field it would be nice to have that field already focused instead of
forcing the user to click in it before they start typing. Is there a
rails (i.e. probably Prototype) way of giving focus to a field? I did
some searching and found nothing.
thanks,
jp
P.S. I''m on a Mac. Perhaps a winoze and/or unix automatically
2006 Aug 14
2
ActionPack: number_to_phone error
Question about the number_to_phone function as provided by rails in actionpack:
http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html
If I do this in my controller:
num = number_to_phone(params[:phone_number])
I get this error:
undefined method `number_to_phone'' for #<TicketsController:0xb7a2bfcc>
Whereas if I do this in my view:
<%
2006 Jul 09
2
float to percentages
Hi, good day to us all,
i was wondering if there was some kind of method for floats to change
them into percentages...i looked up some functions in ruby-doc, but
didn''t find anything suitable.
is there such a thing?
thanks,
harp
--
Posted via http://www.ruby-forum.com/.
2006 Apr 05
1
number_to_currency inside model
I was wondering if this is possible.
I have a model (Item) that contains products. These products have prices
that I''d like to format using number_to_currency. Rather than doing this
several times inside the view, I thought it might be nice to do it once
inside the model.
The item table has an field called regular_price which holds a currency
amount. I would like to do something
2006 Apr 08
2
Cannot use view helpers in RJS helpers
Any ideas why I would get an error in a RJS helper on view helpers
such as number_to_currency.
Example:
# my_template.rjs
page.help_me
# my_helper for my_controller
def help_me
number_to_currency(10)
end
I have also tired page.number_to_currency but that doesn''t work either.
Cheers,
Nicholas
2009 Sep 24
2
Calling ActionView from uninheriting class
Hi Gurus, I have a class, specified in models cart.rb, which doesn''t
inherit from anything--it''s just a container
class Cart
...
I just discovered I can''t call number_to_currency in that class. Any
idea how to "include" it in my code? I tried
ActionView.number_to_currency without luck. I could kill a few lines
of non-DRY regexp code in cart.rb if I could
2007 May 12
4
Multiply and format with thousands separator
I have just started with Ruby and Rails and am still greatly confuse,
finding the usual tutorials not much help.
What I want to do is take two numbers from my database, multiply them
together and display them in a list with a comma for the thousands
separator. This would be very easy to do in a spreadsheet, so I assumed
it would be easy to do in Ruby on Rails but I can''t work out how.
I
2006 Jun 23
6
float calculation error
Hi
I have the following values
pActualCost = 33.00
pPaymentCost = 29.99
So this calculation should leave me with 0.01
pPaymentDifference = pActualCost - pPaymentCost
however when doing this in rails, it returns 0.00999999999999801
has anyone got any suggestions to whats going wrong and how I can
correct this
Thanks
Scott
--
Posted via http://www.ruby-forum.com/.
2013 Feb 27
4
My SCSS compiled CSS lacks "/assets" in the generated urls
Running "rake assets:clobber assets:precompile" will generate files like
"application-xxx.css" with incorrect urls after upgrading to Rails 4.
For example url(/fields/xxx.png) when it should be
url(/assets/fields/xxx.png). For some unknown reason it worked once in
development mode, but after running rake assets:clobber I can''t get it
to work again...
Any ideas
2006 Jul 20
17
The Debian Plan
Hello Folks,
After all the troubles people have had with Debian I realize that what
I''ve done still isn''t enough for smooth sailing. I''m now going to hold
back the 0.3.13.4 release in order to put an end to the Debian problem
once and for all.
I''m currently planning the following changes:
1) Specific documentation for Debian. Debian will become the only