Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Murat Ustuntas's Profile

GitHub User: ustuntas

Site: http://www.ustuntas.net

Comments by Murat Ustuntas

Avatar

+1 This is a good idea :) Thanks for your sharing.

Avatar

Thanks Jaroslaw for the quick but important tip about Node.Js I want to look at Joosy too.

Avatar

Thank you Travis for this information. TodoMVC will help me, i assume, in the near feature.

Avatar

Thank you Ryan. This is really amazing screencast.

I have been seeing the lots of JavaScript frameworks on the planet. How can we determine the correct JavaScript framework?

[Angular|Knockout|Backbone|Active|Sammy|Raphael|Node].JS

Which is the best solution for specific applications as i expected to use with Rails?

I assume that Angular is a good starting point. :)

Avatar

I like the OpenStruct.new usage in this episode. This episode is really a very sharp. Thank you Ryan.

Avatar

Hello Sam,

I use the latest github profiler.rb from miniprofiler, after that my error changed as follows

index
Internal Server Error
undefined method `use_existing_jquery' for #<Rack::MiniProfiler::Config:0x000008061b9c80>
WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18) 

and the console is

log
[2012-07-27 16:02:36] ERROR NoMethodError: undefined method `use_existing_jquery' for #<Rack::MiniProfiler::Config:0x000008061b9c80>
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-mini-profiler-0.1.7/lib/mini_profiler/profiler.rb:396:in `get_profile_script'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-mini-profiler-0.1.7/lib/mini_profiler/profiler.rb:294:in `call'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/railties-3.0.15/lib/rails/application.rb:168:in `call'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/railties-3.0.15/lib/rails/application.rb:77:in `method_missing'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/railties-3.0.15/lib/rails/rack/log_tailer.rb:14:in `call'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-1.2.5/lib/rack/content_length.rb:13:in `call'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-1.2.5/lib/rack/handler/webrick.rb:52:in `service'
        /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
        /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
        /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

How can i help you solving this problem? also thank you for your dealing..

Avatar

I installed miniprofiler as Ryan said. But, the miniprofiler don`t show itself in the index.

My Rails version is 3.0.15 and Ruby version is 1.9.2p180.

When running the rails with server mode, it gives me a

index
Internal Server Error

undefined method `bytesize' for #<ActionDispatch::Response:0x000008079989f0>
WEBrick/1.3.1 (Ruby/1.9.2/2011-02-18) 

and the console log.

log
[2012-07-27 11:02:49] ERROR NoMethodError: undefined method `bytesize' for #<ActionDispatch::Response:0x0000080409add8>
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-mini-profiler-0.1.7/lib/mini_profiler/body_add_proxy.rb:18:in `method_missing'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-1.2.5/lib/rack/utils.rb:276:in `bytesize'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-1.2.5/lib/rack/content_length.rb:22:in `block in call'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-1.2.5/lib/rack/content_length.rb:22:in `each'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-1.2.5/lib/rack/content_length.rb:22:in `inject'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-1.2.5/lib/rack/content_length.rb:22:in `call'
        /usr/local/rvm/gems/ruby-1.9.2-p180@global/gems/rack-1.2.5/lib/rack/handler/webrick.rb:52:in `service'
        /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
        /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
        /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

After that, i running the system from apache/passenger, but still, i couldn`t see the profiler in index, i see the index page source, it give me

html
</html>
<script type="text/javascript">    
    (function(){
        var init = function() {        
                var load = function(s,f){
                    var sc = document.createElement('script');
                    sc.async = 'async';
                    sc.type = 'text/javascript';
                    sc.src = s;
                    var l = false;
                    sc.onload = sc.onreadystatechange  = function(_, abort) {
                        if (!l && (!sc.readyState || /loaded|complete/.test(sc.readyState))) {
                            if (!abort){l=true; f();}
                        }
                    };

                    document.getElementsByTagName('head')[0].appendChild(sc);
                };                
                
                var initMp = function(){
                    load('/mini-profiler-resources/includes.js?v=104',function(){
                        MiniProfiler.init({
                            ids: ["p5a937ewxrrubs0tac38","qey8rl644x2an5x5d6p4","j5um9hugszmuwqk2ohos","7yowrrf5jgiuyr1qay8b","1t75jjzqgolxrdfwh84r","tm9zo7oshjqbvotg9bkm","i4fta5g96t7bfhmi2ifn","xvrw6jdradhpjepdjtb9","dv8soit19h1xro0s0kij","opbu5ya5fgt5mbhbjies","optspv3v29mlw0go62q7"],
                            path: '/mini-profiler-resources/',
                            version: '104',
                            renderPosition: 'left',
                            showTrivial: false,
                            showChildrenTime: false,
                            maxTracesToShow: 10,
                            showControls: false,
                            currentId: 'p5a937ewxrrubs0tac38',
                            authorized: true
                        });
                    });
                };
                if (false) {
                    jQueryMP = jQuery;
                    initMp();
                } else {
                    load('/mini-profiler-resources/jquery.1.7.1.js?v=104', initMp);
                }
                
        };

        var w = 0;        
        var f = false;
        var deferInit = function(){ 
            if (f) return;
            if (window.performance && window.performance.timing && window.performance.timing.loadEventEnd == 0 && w < 10000){
                setTimeout(deferInit, 100);
                w += 100;
            } else {
                f = true;
                init();
            }
        };
        if (document.addEventListener) {
            document.addEventListener('DOMContentLoaded',deferInit);
        }
        var o = window.onload;
        window.onload = function(){if(o)o; deferInit()};
    })();
</script>

Profiler, javascript code after the

html
</html> 

tag..

So, i could not still see the profile.. bad.. so bad.

Avatar

Thank you Ryan. The last two episodes are very handy and useful. Performance is a very important place in the expanding world of Internet.
+1

Avatar

Hello, i have questions about multi rails apps with unicorn. If we want to add two or more rails application with unicorn in nginx, how can we create the multi-unicorn-process startup/shutdown script?

I googled more of them somebody prefered god gem but i couldnt find proper solution for this.

Can you have any idea?

Avatar

Thank you Ryan. I like this nested model forms that starting from scratch. This is awesome.
+1

Avatar

Thank you Ryan. This is really amazing. PostgreSQL and Pg_search are life-saving for more web applications.

+1

Avatar

I like the taps gem :) Thank you Ryan.

Avatar

Hello,

I want to ask a question that how can i upgrade bundler on production system? So i upgrade my bundler without problem from 1.0.10 to 1.1.0 as follows.

bash
# gem install bundler --version='1.1' --no-rdoc -no-ri
# gem uninstall bundler
Select gem to uninstall:
 1. bundler-1.0.10
 2. bundler-1.1.0
 3. All versions
> 1

You have requested to uninstall the gem:
        bundler-1.0.10
jquery-rails-1.0.18 depends on [bundler (~> 1.0.0)]
kaminari-0.10.4 depends on [bundler (>= 1.0.0)]
orm_adapter-0.0.7 depends on [bundler (>= 1.0.0)]
orm_adapter-0.0.5 depends on [bundler (>= 1.0.0)]
rails-3.0.11 depends on [bundler (~> 1.0)]
rails-3.0.7 depends on [bundler (~> 1.0)]
rails-3.0.5 depends on [bundler (~> 1.0)]
thor-0.14.6 depends on [bundler (~> 1.0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]  Y
Successfully uninstalled bundler-1.0.10
# bundle update
# bundle package

thats all and everyting fine for me.

Avatar

Thank you Ryan.

I read the documents about upgrading bundler but after bundler upgraded to 1.1, the other dependent gems also changing. I don`t know that being any problem occur on existing project after bundler upgrading? How can i upgrade to bundler 1.1 without any problem?

Regards.

Avatar

Thank you Andrew, for this good information.

Avatar

Hello Ryan,

I want to ask a question about rollout gem. I use cancan gem in my app and it is very successful.
Is this gem like the cancan gem? I don`t really understand rollout gem.

Avatar

Is friendly_id SEO friendly?

I read link about rails-sexy-url for SEO.

http://www.bingocardcreator.com/articles/rails-seo-tips.htm#sexy-urls

Will friendly_id help us about SEO?

Avatar

9$ is best for one month for me.. :) I assume that the price will be same in 10 years ;) But you should also denote Ryan for 50$.

Avatar

Maybe too late, but i want to ask a question about my error. When i upgrade my application from 3.0.11 to 3.1.3 there is no problem.

But, i have to use double mysql server one of them is legacy database with version 4.0.

When i trying to connect this database, i got an error like that;

Mysql::Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE Key_name = 'PRIMARY'' at line 1: SHOW INDEX FROM personel_giriscikis WHERE Key_name = 'PRIMARY'
ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE Key_name = 'PRIMARY'' at line 1: SHOW INDEX FROM personel_giriscikis WHERE Key_name = 'PRIMARY'

But, in rails 3.0.11 there is no problem and i was making the query in the Mysql 4.0.

Any Idea, thank you.

Avatar

This is great, really great. When create an application with authentication, i used the
devise. But, after that i will try to integrate the warden. There is a very intresting
point that move our authentication up into Rack middleware. Great!

Every time our eyes keep on your screencasts.
Thank you Ryan,

Avatar

How can we make a validation about the token field? Just, I want to validate presence of this field. Any idea?

Regards

Avatar

Thank you Daniel.
I will just look at ElasticSearch with Tire gem. I assume that i would integrate ElasticSearch in my project.

Avatar

farukca: I just try to develop a file flowing. We have some papers comming from other companies. These files includes some unordered information. So somebody make ocr or writedown this unordered fields. And searching on it.

Avatar

Thank you Ryan for this advanced search screencast.

Is there any suggestion for us about fulltext search engines? In Ryan`s screencasts, before,
he show us Sphinx and Sunspot, what about Solr?

Regards.

Avatar

Thank you Ryan,

Can we add to trash box to delete faq links :) with drag? Means Drag and Delete.

May be later, you will add this feature for your casts.

Regards

Avatar

Yeah.. Thank you Ryan.. This is the informative about testing.

I want to share this link for also spork for fast testing:
http://blog.carbonfive.com/2010/12/10/speedy-test-iterations-for-rails-3-with-spork-and-guard/

Avatar

Hello,

I like your RailsCasts series.. :) I am using Ancesry for tree structure in my data. I want to draw
structurel organizatin chart.. How can i do that?

Regards.