Displaying 20 results from an estimated 1100 matches similar to: "No matches"
2006 Jan 12
5
Question about using DISTINCT in ActiveRecord find method.
Hi,
Am relatively new to the RoR world. My question is quite simple.
I have a query like such:
shipmentNumbers = Order.find_by_sql(["select distinct s.id from orders
o, line_items li, shipment_lines sl, shipments s where o.number=? and
o.id = li.order_id and li.id = sl.line_item_id and sl.shipment_id =
s.id", number])
The above query works fine. I wanted to do the same query using
2006 Jan 31
4
RoR production app does not refresh
Hi,
We have a RoR app deployed using Apache + fastcgi in production mode.
When we make a change to say a controller filie on the server and go
back to that page that executes that controller action it takes no
effect. Does Rails cache pages and if so how does one force the new page
to be used?
Thanks,
2006 Jan 18
7
FastCgi issue
Hi,
I know that Apache2 + fastcgi is sometimes difficult to setup, but I was
wondering if anyone has come across this error and if yes what did you
do to resolve it?
[Wed Jan 18 14:58:12 2006] [error] [client 77.123.19.115] FastCGI: comm
with server "/var/htdocs/ot/public/dispatch.fcgi" aborted: idle timeout
(120 sec)
[Wed Jan 18 14:58:12 2006] [error] [client 77.123.19.115]
2006 Jan 24
3
Is there a concise way?
Hi,
Is there a concise/ruby way to do the following:
[Note: 1 and 2 below are not related.]
(1)
for p in 0...@order.line_items[k].shipment_lines.length
shipline_qty = shipline_qty +
@order.line_items[k].shipment_lines[p].quantity
end
(2)
ts = Array.new
for tk in s.trackings
ts.push(tk)
end
2006 Apr 27
1
XML output ..
Hi,
I have a method showme_xml in my controller manager_controller.rb
class ManagerController < ApplicationController
def shome_xml
end
end
I have got a shome_xml.rxml template in my view section.
--
Posted via http://www.ruby-forum.com/.
2006 Jun 17
2
RJS templates - newbie
I am trying to test drive RJS templates in Rails 1.2. Here is what I
did:
create table categories (name varchar(255) );
rails RJSTest
cd RJSTest
rake update_javascripts
script/generate controller home index add
script/generate model category
Note: When I did a rake update_javascripts, I did not see any output.
I configured database.yml to talk to mysql.
Next I wrote
2006 Jan 13
10
[Announcement] Google: Evil or Not?
"Google: Evil or Not?" is my first Rails webapp and I''ve just made it
public at http://evilornot.info
Do you still believe the ?Do no evil? Google mantra? Do you think
Google Book Search, the AOL deal, and Larry and Sergey?s 767 point to
Google losing it?s pristine morality and turning over to the dark side?
Now you can discover what the world thinks and contribute your
2006 Aug 24
8
installing ferret
I am trying to test drive ferret on a ubuntu dapper installation.
I have a ferret-test.rb file like:
----begin---------
require ''ferret''
include Ferret
index = Index::Index.new(:path => ''/opt/search-index'')
----end-----------
When i issue: ruby ferret-test.rb, I get:
ferret-test.rb:1:in `require'': no such file to load -- ferret
(LoadError)
2006 Sep 22
2
Searching untokenized fields
Hi ..
I tried to exclude certain objects from my search, by adding appropriate
term queries ..
i = Ferret::Index::Index.new
i.field_infos.add_field(:type, :index => :untokenized, :term_vector => :no)
i << {:type => "Movie", :name => "Indiana" }
i << {:type => "Movie", :name => "Forrest" }
i << {:type =>
2006 Jun 24
6
Ajax fade effect
I have a list of categories, when I delete one of them, I want that item
to fade and then get removed. So I do the following:
1. home_controller:
def delete
@category = Category.find_by_name(params[:name])
@element_id = @category.name
Category.delete_all(["name = ?", @category.name])
end
2. delete.rjs:
if @element_id
page.visual_effect :fade, @element_id
2007 Mar 21
4
Cannot delete for id of type Array
Hello list,
I have a little weird error when deleting documents from the index.
I''m using the following code.
ferret_index = Ferret::Index::Index.new(:path => FERRET_INDEX_PATH)
query = Ferret::Search::TermQuery.new(:fk_file_id, "#{_fk_file_id}")
ferret_index.search_each(query) do | id |
ferret_index.delete(id)
end
And I get the following error
Cannot delete for id of
2006 Apr 27
3
XML output
Hi,
Sorry abt the half finished post that I sent out earlier.
The idea is to generate an output xml response as such:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<response status=''NOT_AVAILABLE''>
<message>Some text</message>
<from>Me</from>
</response>
I make a request like such
2006 May 01
3
RMagick question ?
I have a file rmg.rb:
require ''RMagick''
include Magick
cat = ImageList.new("prod.jpg")
cat.display
exit
The file prod.jpg is in the same directory as this file above.
I execute the following:
ruby rmg.rb
I get the following output:
/usr/lib/ruby/1.8/RMagick.rb:1377:in `read'': unable to open image `'': No
such file or directory:
2006 Jun 19
10
Trying to delete from a unordered list using ajax
I have a controller method as such:
def delete
@category = Category.find_by_name(params[:name])
@element_id = @category.name
Category.delete_all(["name = ?", @category.name])
end
(For the purpose of this exercise, category names are unique)
I have the corresponding delete.rjs file:
if @element_id
page.remove :id => @element_id
page.visual_effect :highlight,
2006 Mar 31
3
Layout Question .. (Sitemesh related)
Hi,
I understand that the layout concept is very similar to OpenSymphony''s
Sitemesh project. I have done a lot of development with Sitemesh, but am
fairly new to Rails. I am wondering if there is a way for a layout in
rails to find out value of a variable from a page it is decorating?
In sitemesh you would be able to do <meta name="show_menu"
content="true"> on
2006 Sep 22
1
Query Objects vs. Query Strings
Hi ..
I tried to build some query objects to get some documents from my
index.. without success.. Is something wrong here?
q = Ferret::Search::BooleanQuery.new
q1 = Ferret::Search::TermQuery.new(:type, "movie")
q2 = Ferret::Search::TermQuery.new(:name, "Indiana")
q.add_query(q1, :should)
q.add_query(q2, :should)
Indexer.index.search_each(q) do |doc, score| puts doc end
0
2006 May 24
8
Where to recruit Ruby on Rails developers?
Anyone have suggestions on where to recruit Ruby on Rails developers?
My startup''s in Berkeley, CA and I''m looking for a talented technical
lead. I''ve tried LinkedIn and Craigslist but the pickings are slim. This
project provides an opportunity to use OpenLaszlo.
rocky at_sign teampatent dot com
--
Posted via http://www.ruby-forum.com/.
2006 Jan 14
7
Application Design
Hi Railsers,
How do you design your applications? Do you start coding HTML? Start
with the controllers/models? Start in a program like
photoshop/gimp/illustrator/inkscape?
I start in inkscape, it''s a SVG editor. I sketch all the views of my
application, and then I create the views that belong to one controller
in RHTML. After that, I do the models/controller, and move on to the
2005 Dec 14
5
Query question
I have an index in which I want different records to be accessible to
different users. I think I can do this by adding a "users" field to
each record in the index and narrow down my queries to only those
records matching the current user''s userid. I have the userids
separated by commas. What would be the right way to query for a
certain user? I have to make sure that I
2007 Jan 01
2
Possible Bug when Creating Indexes
I''m running:
ferret (0.10.9)
ruby 1.8.5 (2006-08-25) [i386-mswin32]
on Windows XP(SP2)
When I create an index as follows:
field_infos = FieldInfos.new(:store => :yes, :term_vector => :no, :index
=> :yes)
field_infos.add_field(:id, :index => :untokenized)
field_infos.add_field(:subject)
field_infos.add_field(:author)
field_infos.add_field(:tags, :store => :no)
index =