Displaying 20 results from an estimated 300 matches similar to: "routers are handled incorrectly on production"
2008 Jun 05
3
how to specify controller '/admin/foo'
WeBrick handles the link correctly on development, but apache in
production does not:
<%= link_to "Orders", :controller => ''/admin/orders'', :action => ''index'' %>
The controller lives in ./app/controllers/admin/orders_controller.rb
From the production log, apache is looking for the "orders" action in
2006 Jul 28
2
newb question...
This is what it says when i have this stupid error...
app/controllers/info_controller.rb:9: syntax error
this is what is inside of info_controller,
class InfoController < ApplicationController
def who_bought
@product = Product.find(params[:id])
@orders = @product.orders
respond_to do |accepts|
accepts.html
accepts.xml
end
end
if someone could please help me...
-/ James
--
2010 Dec 31
1
WickedPDF - wrong number of arguments
I''m trying to get this plugin to work for me. I''m having the
following issue when I try to render a pdf (/fancy_things/45.pdf )..
Any suggestions?
Thanks!
ERROR:
Started GET "/fancy_things/45.pdf" for 192.168.66.1 at Fri Dec 31
10:59:07 -0500 2010
Processing by OrdersController#show as PDF
Parameters: {"id"=>"45"}
2008 Apr 04
0
named_scope and ordering
Hi,
this is a general design question and I liked to see how other people
handle the following situation: Before named_scope I wrote custom
finders for my model classes. Something like
# order.rb
class Order < ActiveRecord::Base
class << self
def find_all_marked
find(:all, :conditions => {:marked => 1}, :order => ''name ASC'')
end
end
end
Now
2014 Mar 01
0
Rails controller problems
1. Users_Controller CRUD expects param[:id] to create User instance. With
Orders_Controller, I'd like to retrieve a list of users who have ordered. I
know Orders_Controller expects param[:id] to be for creating Order
instance. So does this mean if I want to retrieve a list of users who have
ordered, I should create a method called 'get_orders' in Users_Controller?
2. Can
2006 Jul 07
8
Possible name clash?
Scenario:
Table in database has two fields, id and category (table name is:
categories)
Controller is named category_controller.rb
Model is named category.rb
Helper is named category_helper.rb
Form is named list.rhtml in view\category directory
The code in play on the form is (from generating scaffold):
<% for category in @categories %>
<tr>
<td><%=
2006 Aug 16
1
how to update a collection_select from another
I have two collection_select in my list.rhtml:
<%= collection_select (:region, :id, @regionall, :id,
:title,html_options={:onChange => "new
Ajax.Updater(''related_provinces'',''/categories/related_provinces/" +
"?id=''+this[this.selectedIndex].value,
{asynchronous:true, evalScripts:true});"}) %><br>
<%= render :partial =>
2006 Jan 06
6
HABTM problem not saving all associations
Hello all,
I have an Order object that has and belongs to many Products and has
and belongs to many Loan Types. This is so I can select multiples of
each in my order entry screen via checkbox groups.
I''m having some trouble with saving multiple HABTM associations for a
single model object; only the first HABTM association declared in the
model will save during the initial @order.save
2013 Sep 23
1
redirect on browser success, but redirect on functional test is error
line_items.yml:
one:
product_id: 1
cart_id: 1
quantity: 1
carts.yml:
one: {}
product.rb:
has_many :line_items
cart.rb:
has_many :line_items, dependent: :destroy
line_item.rb:
belongs_to :product
belongs_to :cart
line_item_controller.rb:
def destroy
@line_item = LineItem.find(params[:id])
@cart = @line_item.cart
@line_item.destroy
respond_to do |format|
format.html
2005 Feb 27
12
Four Days on Rails
There are a number of really good beginner''s guides to Rails on the web
now - covering installation through to running the first ''scaffold''.
However, as a complete Ruby newbie, I found the next stage - moving on
to producing ''real'' applications - quite hard going.
To help others make the same journey, I''ve put together a ''next
2012 Aug 01
1
Strange error: uninitialized constant Barby::Code128A on Heroku server?
I can`t figure out why on heroku server my app crashed. On local server all
seems works.
2012-08-01T17:14:50+00:00 app[web.1]: NameError (uninitialized constant Barby::Code128A):
2012-08-01T17:14:50+00:00 app[web.1]: app/models/order.rb:102:in `generate_shipment''
2012-08-01T17:14:50+00:00 app[web.1]: app/models/order.rb:60:in `generate_items''
2012-08-01T17:14:50+00:00
2013 Jun 07
1
gamm in mgcv random effect significance
Dear R-helpers,
I'd like to understand how to test the statistical significance of a
random effect in gamm. I am using gamm because I want to test a model
with an AR(1) error structure, and it is my understanding neither gam
nor gamm4 will do the latter.
The data set includes nine short interrupted time series (single case
designs in education, sometimes called N-of-1 trials in medicine)
2006 Apr 08
0
Typo and Instant Rails 1.2
Instant Rails is at 1.2 and I have installed Typo SVN Revsion 1000.
The sidebar changes stall with the spinner running even after the
*publish* button is clicked. The changes, themselves, do appear in the
actual blog.
When the *Sort Alphabetically* is clicked under categories an error
occurrred. I changed the code as follows:
2006 Feb 22
3
Listing/Relationship Question
Hello,
I know this is probably super simple, but for some reason I just can''t get
it!
What I want to do is click on a post and display all the categories that the
post is in.
class Post < ActiveRecord::Base
has_many :categories
end
class Category < ActiveRecord::Base
belongs_to :post
end
...simple enough.
In the categories_controller I have this:
def list_all_categories
2010 Mar 08
0
betternestedset in rails 3.0
Hi Guys,
when i upgraded my rails 2.3.4 to 3.0 my betternestedset is not working.
It was working fine in the older version. This is my controller
def new
cat = Category.new
cat.text=''test''
cat.save
cat.move_to_child_of(Category.find_by_id(1)) #26
redirect_to :action => ''index''
end
It gives me this error : "You cannot move a
2004 Aug 16
0
tdb database problems on mipsel-linux
Hello,
I am trying to compile Samba 3.0.5 on a Playstation 2 running a
BlackRhino GNU/Linux system. The Samba sources where compiled
with ...
-> build system type: mipsel-unknown-linux-gnu
-> host system type: ditto
-> target system type: ditto
Every time I try to execute '/usr/local/sbin/smbd -d 5 -i' I am
getting the following result:
2014 Jun 20
0
Errno::ECONNREFUSED (Connection refused - connect(2))
I am reading " Agile Web Developement with rails". I am using Ruby 1.9.3
and Rails 3.2.16.
I can able to run application locally But application not working on
heroku. I deployed my application successfully on heroku.
When I run rake test, there is no failure.
When I click on place order button i got error like:
>We're sorry, but something went wrong.
I have attached heroku
2002 Sep 10
2
Traceroute
How do I allow traceroute to reach my server? Pings work fine but
traceroute stops at the last hop before my server. If I shut off the
firewall it reaches it fine.
PING danicar.net (24.222.246.120): 56 data bytes
64 bytes from 24.222.246.120: icmp_seq=0 ttl=237 time=104.0 ms
64 bytes from 24.222.246.120: icmp_seq=1 ttl=237 time=74.9 ms
64 bytes from 24.222.246.120: icmp_seq=2 ttl=237 time=90.6
2009 Jan 24
1
Asterisk freezes with Fixup failed on channel SIP/...<MASQ>
On a production system, running 1.4.17 (compiled from bristuff-0.4.0-test6-xr1) we had this strange issue two times in the last
weeks:
[2009-01-13 13:58:30] WARNING[1213] channel.c: Fixup failed on channel SIP/2332-081d0108<MASQ>, strange things may happen.
[2009-01-13 13:58:30] WARNING[1213] channel.c: Hangup failed! Strange things may happen!
[2009-01-13 13:58:30] WARNING[1213]
2010 Apr 14
1
Rails does not display form error message on a custom method
Hi all,
I''ve created a custom method called checkout in my app. I create an
order (which is done my adding products to my "cart"), assign it to my
client, and then I head to my checkout screen where I confirm the items
and enter their customer order number and complete the order (submit).
Everything works great except that it doesn''t display error messages.