Displaying 20 results from an estimated 3000 matches similar to: "working with rails and unicode"
2005 Dec 28
9
Idiom question - assertions which aren''t in tests
All,
Although I''ve been keeping an eye on Ruby for several years now, I don''t
have a huge amount of experience with it. So please forgive me if I''m
missing something obvious. I''m in the process of writing my first really
"serious" Rails app and would appreciate your advice.
I am wondering if there is a standard idiom for including assertions in
2006 Feb 04
2
Associations oddity
Can anyone explain this oddity to me?
Given two classes as follows:
class Question < ActiveRecord::Base
belongs_to :category
end
class Category < ActiveRecord::Base
has_many :questions
end
I get the following:
>> q = Question.find 6789
=> #<Question:0x37e9e70 @attributes={"id"=>"6789",
2006 Sep 20
15
Why Rails + mongrel_cluster + load balancing doesn''t work for us and the beginning of a solution
We have been searching for a Rails deployment architecture which works for
us for some time. We''ve recently moved from Apache 1.3 + FastCGI to Apache
2.2 + mod_proxy_balancer + mongrel_cluster, and it''s a significant
improvement. But it still exhibits serious performance problems.
We have the beginnings of a fix that we would like to share.
To illustrate the problem, imagine a
2006 Feb 07
4
ruby-forum.com problems?
Anybody else experiencing problems accessing
ruby-forum.com ? For the past week or so I''ve mostly
not been able to access it. It either never loads, or
displays a 500 error message. I prefer it though to
direct email, or the Mailman archives.
csn
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
2006 Sep 01
2
Configuring Mongrel logging
Is there any way to configure Mongrel''s logging? Specifically, I''d like to
get it to output to syslog. Our Rails apps already do this (via
SyslogLogger) - is there any way to persuade Mongrel to do the same?
Thanks!
--
paul.butcher->msgCount++
Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?
MSN: paul at paulbutcher.com
AIM: paulrabutcher
Skype:
2006 Jan 21
2
Documentation for mocks?
Is there any documentation about how mock objects work in RoR,
specifically exactly how one should use the test/mocks directory. Is it
just me being incompetent searching for it, or hasn''t this been
documented yet?
Thanks in advance for your help!
paul.butcher->msgCount++
Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?
--
Posted via
2006 Sep 18
11
Finally! Mongrel 0.3.13.4 Official (for Unix)
Hello! Today I''m announcing a "soft but official" release of Mongrel
0.3.13.4 for the Unix fans in the crowd. It''s been running stable for
quite some time now for many people, and should be great for nearly
everyone.
You can read the announce at:
http://mongrel.rubyforge.org/
This release includes new versions of mongrel_upload_progress and
mongrel_cluster.
2007 Jan 18
4
Problem with encoding - characters such as öäü
Hi
I''m trying to use german characters on a ruby on rails application, but
for get ? on dropwdown menus. The database, tables and fields are
encoded utf8_general_ci. I have this in my application controller:
class ApplicationController < ActionController::Base
before_filter :set_charset
before_filter :configure_charsets
def set_charset
@headers["Content-Type"] =
2005 Dec 09
1
utf-8 BIG problems
hey,
------------------
i have change my db to utf8-general-ci, now all the characters are correct in
the database, i need this for exporting to pdf en excel. now i can also import
from csv, characters like éàï....
But the display is then fucked up. i get wierd symbols
-------------------
Another situation:
I have seen a post here to add to environment.rb:
$KCODE = ''UTF8''
2007 Feb 28
1
One page in app keeps rendering as text/plain
Here''s what I get from wget -S:
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Wed, 28 Feb 2007 15:52:06 GMT
Server: Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a
mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.4
FrontPage/5.0.2.2635.SR1.2 mod_ssl/2
.8.28 OpenSSL/0.9.7a
#<#<Class: 0x2a96d0b978>:0x2a96d0b928>Content-Type:
2006 Nov 04
0
headers[''Content-Type''] & link_to_remote on Rails Edge
I''m on rails edge and am calling an after filter on my actions. Works
except for my ajax calls via link_to_remote. When I inspect headers,
I see the ''Content-Type'' is key for an object rather than a string.
Shouldn''t it be a string? Anyone know if this is a bug or if I''m
dealing with this incorrectly.
Thanks,
Jamie
The code:
after_filter
2006 May 08
2
How to set the default language in GetText?
How to set the default language in GetText?
The default language of GetText is en,and I want to change it to another
language,and also keep the ability to change to any other languages by
just click the according href.
Currently I use:
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html;
2006 Jan 30
5
a RJS problem/patch
Hi,
add_rjs_to_action_view.rb of javascript_generator_templates
doesn''t work with setting Content-Type in a controller.
(e.g.) http://wiki.rubyonrails.org/rails/pages/HowtoSetDefaultEncoding
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html; charset=utf-8"
end
end
I
2006 May 09
4
Ajax calls and characters encoding (accents)
Hello, my application controller defines
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html; charset=ISO-8859-1"
end
Everything is fine and accents are rendered correctly in the browser.
However, when I call a controller/action from Ajax (Prototype), the
charset is not taken in account and accents are garbage displayed (''?''
2006 Apr 15
0
[maybe ot] Special Characters in DB Fields
I have MySQL on a Linux (RH) server and Mac OSX. I did a mysqldump on the
Linux box and imported it into the database on the Mac. The following text
is in one of the fields:
Maui???s Westin Ka???anapali
This is supposed to read
Maui''s Westin Ka''anapali [note: straight quotes shown here are really
apostrophes]
In fact, it renders properly when served up from the Linux box
2007 Jul 30
0
Rails/MSSQL error
Hi,
I have been encountering this error when I try to save text with
japanese characters:
DBI::DatabaseError: Execute
OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server
Line 1: Incorrect syntax near ''20070730''.
HRESULT error code:0x80020009
Exception occurred.: INSERT INTO categories ([category_name],
[updated_at], [created_by],
2016 Jan 08
0
yum-cron / email sending problem
I want to use yum-cron with email notificaton.
The upgrade runs, but i get no message. yum-cron aborted with this
message:
[root at h1 yum]# yum-cron
Traceback (most recent call last):
File "/usr/sbin/yum-cron", line 711, in <module>
main()
File "/usr/sbin/yum-cron", line 708, in main
base.updatesCheck()
File "/usr/sbin/yum-cron", line 631,
2007 Oct 15
24
Design flaw? - num_processors, accept/close
Rails instances themselves are almost always single-threaded, whereas
Mongrel, and it''s acceptor, are multithreaded.
In a situation with long-running Rails pages this presents a problem for
mod_proxy_balancer.
If num_processors is greater than 1 ( default: 950 ), then Mongrel will
gladly accept incoming requests and queue them if its rails instance is
currently busy. So even
2006 Mar 22
9
Display problem
hey guys,
Does anyone know why the french letter "?" is displayed as a question
mark "?" inside an <h1> tag ?
--
Posted via http://www.ruby-forum.com/.
2006 Sep 19
9
Very strange: Umlauts (äöü) aren't displayed correctly in
Hi all
Take a look at the following video, please... I just'' can''t help me
anymore...
http://josh.ch/files/temp/rails_problem.mov
I''m sorry for the bad quality, it''s just a demo of Snapz Pro X 2... ;-)
But I hope you''ll see enought...
Thanks for any help.
Josh
--
Posted via http://www.ruby-forum.com/.