[Rails] Select with an alias does not show alias column in "having".

2014-09-03 Thread ruby user
The Model Image has many Tags When i run this query to get Images with tags that are named both bamboo in and Green i get an error that says the alias table is not present. What am I doing wrong? Image.joins(:tags).select("images.*, count(tags.id) as 'tags_count'").where(tags:{name:["bamboo

[Rails] Re: ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf.

2014-09-02 Thread ruby user
Its shouldn't be prohibitively expensive, I'll have to run more extensive test to analyze the cost. On Saturday, August 30, 2014 8:28:16 PM UTC+8, ruby user wrote: > > I am getting problems with a json request using the rails api gem and > webrick. > > When i do a inde

Re: [Rails] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf.

2014-08-30 Thread ruby user
> finaljson.to_json(:include => :comments) end On Saturday, August 30, 2014 8:54:58 PM UTC+8, Colin Law wrote: > > On 30 August 2014 13:28, ruby user > > wrote: > > I am getting problems with a json request using the rails api gem and > > webrick. >

[Rails] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf.

2014-08-30 Thread ruby user
I am getting problems with a json request using the rails api gem and webrick. When i do a index search with GET, i have an error ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf. Below is a full log of the problem.I have been trying to google the io_fillbuf but i can’t seem to

[Rails] Ruby rails - net-ldap search not working

2012-03-26 Thread Ruby User
I am trying to search ldap. This is doing successful authentication, ldap connection is successful. Then when I make a search query it can not read attributes from LDAP (AD). What is wrong here? #!/usr/bin/env ruby require "net-ldap" $username = String.new class ActiveDirectoryUser SERVER = '1

[Rails] Re: What is this error?

2012-03-26 Thread Ruby User
Hi Alex, I was able to solve the issue. Don't know what was wrong, but I removed ruby, gems, rails, rvm completely from the machine. Rebooted and installed everything freshly. That worked, now no more errors in loading any gem. thanks for your help -- Posted via http://www.ruby-forum.com/.

[Rails] Re: What is this error?

2012-03-23 Thread Ruby User
Hi Alex, changing it to require 'action_pack' worked. But other gems has the same issue - # ./test.rb /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- bundler (LoadError) from /usr/local/rvm/rubies/ruby-1

[Rails] Re: What is this error?

2012-03-23 Thread Ruby User
Yes. actionpack is installed. # gem list -d actionpack /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in `': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. *** LOCAL GEMS *** acti

[Rails] Re: What is this error?

2012-03-22 Thread Ruby User
Hi Alex, thanks a lot for some informative advice. I tried those things. Still no luck :/ # env | grep -i rvm rvm_bin_path=/usr/local/rvm/bin GEM_HOME=/usr/local/rvm/gems/ruby-1.9.3-p125 IRBRC=/usr/local/rvm/rubies/ruby-1.9.3-p125/.irbrc MY_RUBY_HOME=/usr/local/rvm/rubies/ruby-1.9.3-p125 rvm_ta

[Rails] Re: What is this error?

2012-03-22 Thread Ruby User
Here is the o/p of gem list # gem list -d actionpack /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in `': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. *** LOCAL GEMS *** actionpa

[Rails] Re: What is this error?

2012-03-22 Thread Ruby User
Hi Alex, I tried you suggestion. Still getting the same error. #!/usr/bin/ruby1.9.2 #!/opt/framework3/ruby/bin/ruby -w #!/usr/bin/ruby -w require 'rubygems' require "cgi" require "action_pack" ./test.rb:6:in `require': no such file to load -- action_pack (LoadError) from ./test.rb:6:

[Rails] What is this error?

2012-03-21 Thread Ruby User
I seem to have correct include path, but a lot of gems can't be loaded via "required". What could be the problem? #!/usr/bin/ruby -w require "cgi" # cant load this require "actionpack" # can not load this # /var/www/ruby/test.rb /var/www/ruby/test.rb:3:in `require': no such file to load -- /var/

[Rails] Re: Ruby - read cookie

2012-03-21 Thread Ruby User
Hi Colin, I am trying to read cookies for the client. The cookie values are being sent to the server, I can see that in http request capture. I am using the above ruby code to read those cookie values. And that is not working. Thanks -- Posted via http://www.ruby-forum.com/. -- You received