Ruby on Rails Tuesday, May 31, 2011

In order to work with Robert Half Associates, they want me to sign
this thing that is about 4 pages and says "Hourly Employment
Agreement". The first part says "Consultant agrees to provide, on an
as needed basis, such IT services required by Robert Half from time to
time .. work provided hereunder shall be under direction of Robert
Half or client(s) of Robert Half ..

If I don't sign this contract, they told me that they can not send me
on any interviews. This seems a departure from the way that other
agencies I have worked with operate. My mother's advice is if I am not
sure, then don't sign it. I am curious what other developers might say
or what their experience might have been with this agency ?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails

So... the old database used what type of encoding? latin1? And the
new one uses utf8?

Is it a problem if some articles were already cleaned by doing a
search and replace, e.g. swapping all ’ for its corresponding proper
symbol?

Really appreciate the help!

On May 29, 2:19 pm, Frederick Cheung <frederick.che...@gmail.com>
wrote:
> On May 29, 6:45 pm, daze <dmonopol...@gmail.com> wrote:> I'm wondering if anyone can give any insight into how I could resolve
> > the problem on this website:
>
> >http://jdrampage.com/
>
> > basically, all the ' are supposed to be apostrophes ( ' ), and
> > quotes are messed up too...
>
> > Is it possible to run some command in the "rails console production"
> > to fix this?
>
> That does indeed look like an encoding issue. I assume that your '
> were in fact curly quotes. This kind of thing can happen when there is
> a mismatch between the encoding the database is using and what rails
> is using.
>
> For example if rails is using utf8, but the database connection is set
> to CP1252 then in order to save the curly quote character, your ruby
> script would send the bytes E3 80 99 which is the utf8 sequence for
> the uncode right single quotation mark (U2019).
> If your db connection is set to be latin1 (or any similar single byte
> encoding) then it will happily store that byte sequence as it is.
>
> If now your app were to start doing the right thing and ask the db for
> utf8 then converts what it things is latin1 (but is actually already
> utf8) into utf8 a second time and so you get garbage (in cp1252 E3 80
> 99 is ’ which is what I see on your website). In order to fix this
> you typically want to tell the database to reinterpret the contents of
> text columns as utf8. How exactly depends on your database, but in
> mysql something like
>
> alter table foos MODIFY some_column BLOB;
> alter table foos MODIFY some_column TEXT CHARACTER SET utf8;
>
> will reinterpret whatever is in some_column as utf8. This might not be
> exactly what you need - experiment with your data to see exactly what
> what has happened - I once had a case where text was going through
> this double encoding process twice so I had to repeat the above
> commands twice to straighten out the data). Once you've sorted things
> out, make sure you don't fall into this hole again by making sure that
> all your databases and tables have their default encoding set to utf8
>
> Fred
>
> > Really appreciate any help!!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Ruby on Rails


On 31 May 2011, at 13:19, Yiannis wrote:

Currently ruby enterprise edition is in 1.8.7 and I prefer to use
1.9.2. My problem with the passenger is with the slow initial server
response time. I have tried many things (including all the
recommendations from here
http://stackoverflow.com/questions/853532/slow-initial-server-startup-when-using-phusion-passenger-and-rails),
but I didn't see any significant difference.

That is basically the main issue with the passenger which I don't know
how to fix it and made me thinking of other solutions. If I use nginx
instead of apache, will this help with the problem?

No, the initial slow request is because no app instance has spawned yet. So, when you restart your Rails app, Passenger kills off all instances and the Spawner just waits until a request comes in. Only then will it boot up your Rails app and start using memory.

However, some time ago Passenger introduced a new setting called passenger_min_instances, which will keep at least the number of instances you specify running. That should eliminate the slow startup speed at the expense of guaranteed memory use even when an instance is idle and not needed anymore.


Best regards


Peter De Berdt