Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Denis's Profile

GitHub User: denispeplin

Site: http://denispeplin.github.com

Comments by Denis

Avatar

I tried to implement application with ActionController::Live again, and had some troubles with multi-treading. I found it doesn't work. But then discovered, that it actually zsh's repeat command doesn't work appropriately. It sends commands one-by-one. Checked with zsh 5.0.0-2ubuntu1 version.
Also, I tried to check by opening two different Chrome tabs. Same effect, Chrome waits while one request will finish, then sends another.
So multi-treading can be checked either by sending two curl requests from different console tabs, or by using two different browsers.

Avatar

Spent whole day attempting to adapt Foundation to my existing application with simple_form. Nothing is works out of box, and documentation for Twitter Bootstrap is way better.

Avatar

With rvm, startups also much faster when optimization patches are used, for example ruby-1.9.3-p392-railsexpress or ruby-2.0.0-p0-turbo.

Avatar

Joosy seems does not as easy to use as declared.

Avatar

You can try to implement Angular's "Hello world" in jQuery. That's where jQuery solution will be more complex, and that's why I like Angular.

I created a gist with another example: https://gist.github.com/denispeplin/5096725

This code I'm using for displaying RRD graphs of different types. I will be surprised if someone will implement same thing in jQuery with same or less amount of JavaScript code.

Avatar

Exactly. It is not easy to start writing applications in some js framework while jQuery suits most use cases really well and it so easy to start with. But I found that Angular can solve some tasks in a way that easier to implement than jQuery equivalent. Most important, you don't have to setup full-stack application for Angular. Just include it and start using.

Avatar

Me too. I'm just starting with Angular, but already can't imagine myself doing something in Ember or Backbone :)

Avatar

Devise is almost ready to use with Rails (look at 'rails4' branch in its repository), but including ActionController::Live crashes the application.

For the moment, solution is to move events action to separate controller.

Avatar

Tried to implement this episode, it works!

Not such a big overhead adding Redis server.

Avatar

Gnome-only solution.

Too many mac-specific stuff everywhere in the Ruby world. Sad. But in this specific case it is the Chrome fault. It is actually unable to launch external editor in Linux.

Avatar

That is the issue #1 with server-side processing. Whatever server-side search will be implemented, anyway it will searching against server-side 'look' of the data. Client-side search will find exactly what user wants even in complex cases.

So I would rather implement some pre-filtering by date or other parameters and pass all that filtered data to client-side.

Other issues, that not covered in this episode, like sorting on associated table values, can be solved relatively easy using joins.

Avatar

Great topic, I waited for this a for a long time. Thanks!

One thing that I missing in this episode: Redis was described instead of PostgreSQL. Going to figure out how to do this with pgsql. Maybe this gem is applicable: https://github.com/ryandotsmith/queue_classic

Avatar

Controller looks ugly? Move stuff to separate class.

Command is too long? Make an alias.

Avatar

Tried this. Looks great, but requires a lot of effort to fit in my environment (I18n, etc.).

Avatar

And another gem, closure_tree: https://github.com/mceachen/closure_tree

"Closure Tree is a mostly-API-compatible replacement for the ancestry, acts_as_tree and awesome_nested_set gems".

Avatar

That is great approach, thank for the link. Unfortunately, in my current project I have two databases, and some models are connects to second database, so this approach does not work.

Avatar

This fixes encoding issue, thanks!

Avatar

And another issue.

private_pub.ru should contain:

Faye::WebSocket.load_adapter('thin')

Taken from https://github.com/faye/faye/issues/128

Avatar

gem 'thin' should be in Gemfile for this to work:
rackup private_pub.ru -s thin