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
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
> 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.
>
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
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
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/.
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
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
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
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
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:
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/
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
13 matches
Mail list logo