On May 6, 11:14 pm, Jay wrote:
> Hey folks,
>
> I'm just starting out learning Rails, so I picked up "Agile Web
> Development with Rails" and tried to get a demo server going. I
> entered the command C:\Sites\demo>rails server and got the
> following messages:
>
> => Booting WEBrick
> => Rail
Hello Walter,
Thanks for the reply. I just want to run my final year engineering
project on windows based LAN. i use webrick as my server so i want to
knw how can i run the app in one machine and access in oder systems. I
have not be alloted a special server also. I have a PC to deploy the
app with
Thanks Michael for the reply... My college sysadmin doesnot know how
to deploy the rails app. He knows to deploy websites with apache
server but my rails app uses webbrick. So i wanted to know how to
deploy it in webbrick and access in LAN.
On May 6, 7:13 pm, Michael Pavling wrote:
> On 6 May 201
Hey folks,
I'm just starting out learning Rails, so I picked up "Agile Web
Development with Rails" and tried to get a demo server going. I
entered the command C:\Sites\demo>rails server and got the
following messages:
=> Booting WEBrick
=> Rails 3.0.7 application starting in development on ht
@Robert, @Fred, @Max
GOT IT! You all had a piece of the puzzle.
(Robert: As an aside, you mean "you call Product.descendants()" -- not
dependencies() -- but that's a trifle.)
I realized that my reason that the Fred/Robert solution didn't work was
correct: a request passes in the string "PGEBu
@ Fred, @Robert Pankowecki:
Frederick Cheung wrote in post #996972:
> Have you been mixing in calls to require with calls to
> require_dependency/letting rails load things automatically? That can
> make a giant mess of things where some classes are reloaded and others
> aren't, so for example PGES
Max Schubert wrote in post #996908:
> Could you respond with your development.rb file (with names sanitized
> as needed?) .. what version of Rails are you using? We have been
> using 3.0.5, just upgrading to 3.0.7 this week
Sure. Here it is. Thanks.
= versions (I'll move to 3.0.7 when
Thanks.
When you add something to a helper like articles_helper, does it have the
request object in there also?
How does it get the @articles object when I call it like:
form_for @article, correct_post_path, ...
I would have though it would be:
form_for @article, correct_post_path(@article), .
I am thinking of doing a iphone all and android app. What is the best way
to handle on the backend if you have say user has _many :blah? Would you
authenticate on the front end or send other info to the backend to associate
the user on the phone with items on the backend?
--
You received thi
I had no other choice to change the permissions on /opt/nginx to the
group in charge of the webapp stuff.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to ru
oh my, putting
form_for [@inventory, @order]
worked.
Thanks a million!!
On May 6, 6:14 pm, Jens Fahnenbruck wrote:
> You can try
>
> <% form_for [@inventory, @order] do |f| -%>
>
> this will create the correct url (). And you can get rid of the hidden field with the
> inventory_id.
>
> why do
I have an UploadsController and UsersController where Users'
has_many :uploads' via polymorphic attachment in uploads.rb.
Now we i navigate to http://localhost:3000/users/1/uploads
I get re-routed to Uploads#index and rendered is called multiple times
as shown below:
Started GET "/users/1/uploa
You can try
<% form_for [@inventory, @order] do |f| -%>
this will create the correct url (). And you can get rid of the hidden field with the inventory_id.
why do you have `if !@inventory` around your submit tag? If the form is only
available with the nested resource url, than it should be alwa
This is the new view for the order:
<%= error_messages_for :order %>
<% form_for :order do |f| -%>
<%= label_tag 'Quantity Requested by order:' %>
<%= f.text_field :qty_requested %>
<%= f.hidden_field :inventory_id, :value=>@inventory.inventory_id %>
<% if !@inventory.nil?%><%= submit_tag 'Submi
On 6 May 2011 23:53, Frederick Cheung wrote:
>
>
> On May 6, 10:42 pm, Mauro wrote:
>> class Shop < ActiveRecord::Base
>> has_many :documents
>> validates :name, :presence => true
>> accepts_nested_attributes_for :documents
>>
>> class Document < ActiveRecord::Base
>> belongs_to :shop
>>
On May 6, 10:42 pm, Mauro wrote:
> class Shop < ActiveRecord::Base
> has_many :documents
> validates :name, :presence => true
> accepts_nested_attributes_for :documents
>
> class Document < ActiveRecord::Base
> belongs_to :shop
> validates :reference_number, :presence => true
>
So you
sorry, but I can't work with this error, can you post some more info from the
logfile around this error, especially the request log.
and can you show me the code of the form in the orders#new view
On Freitag, 6. Mai 2011 at 23:47, Mlle wrote:
I was on /inventories/4000/orders/new page and click
I was on /inventories/4000/orders/new page and click "submit" to
create a new order before getting the error message.
On May 6, 5:45 pm, Mlle wrote:
> ok I made the change number 2.
>
> THis is the full trace:
>
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
> gems/1.8/gem
ok I made the change number 2.
THis is the full trace:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/
recognition_optimisation.rb:64:in `recognize_path'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/l
class Shop < ActiveRecord::Base
has_many :documents
validates :name, :presence => true
accepts_nested_attributes_for :documents
class Document < ActiveRecord::Base
belongs_to :shop
validates :reference_number, :presence => true
The partial _form for shop is:
- @shop.documents.build
= s
1. can you post the full error message and what you did to get it
2.
def get_inventory
@inventory = Inventory.find(params[:inventory_id])
end
should_be
def inventory
@inventory ||= Inventory.find(params[:inventory_id])
end
the the Inventory is cached if you need it multiple time during one re
hmm now I get Only get, put, and delete requests are allowed.
This is in my routes:
map.resources :inventories do |inventory|
inventory.resources :orders
end
map.resources :orders
And this is my controller:
before_filter :login_required, :get_inventory
def new
@order = @inven
The routes description is different in rails 2.3.5
map.resources :inventories do |inventory|
inventory.resources :orders
end
The rest should work as described.
On Freitag, 6. Mai 2011 at 22:56, Mlle wrote:
Oh, I should have mentioned that I'm using Rails 2.3.5. I'm not sure
> if that makes a dif
Oh, I should have mentioned that I'm using Rails 2.3.5. I'm not sure
if that makes a difference?
I'll try out what you suggested, thanks!
On May 6, 4:51 pm, Jens Fahnenbruck wrote:
> @order = inventory.order.build(params[:order])
>
> should be
>
> @order = inventory.orders.build(params[:order])
>
@order = inventory.order.build(params[:order])
should be
@order = inventory.orders.build(params[:order])
On Freitag, 6. Mai 2011 at 22:50, Jens Fahnenbruck wrote:
I'm not sure if I understood you correctly. I assume you have a route like this:
>
> resources :inventories do
> resources :orders
>
I'm not sure if I understood you correctly. I assume you have a route like this:
resources :inventories do
resources :orders
end
If so you could use a before filter to automatically load the inventory in your
OrdersController before every action like this:
class OrdersController < ApplicationCo
Hi,
I'm trying to create forms for child objects that are separate from
the parent objects but that preserve the relation. I have this as my
controller methods but when I submit the "new" form it says :
Couldn't find Inventory without an ID
Can you please help?
def new
@order = @invent
On 6 May 2011, at 20:47, Robert Walker wrote:
> Joan Gu wrote in post #997068:
>> I have an object array @keywords = Keyword.find_by_sql(sql). Now I need
>> to write all values of @keywords to a csv file, and because the sql
>> statement is dynamically generated, hence the attribute names are
>
Joan Gu wrote in post #997068:
> I have an object array @keywords = Keyword.find_by_sql(sql). Now I need
> to write all values of @keywords to a csv file, and because the sql
> statement is dynamically generated, hence the attribute names are
> dynamic too. How can I do it?
Keyword.write_csv(@keyw
rvm sudo prompts me for my password, so I guess under the hood it's
triggering sudo, so why that it now have the proper permissions over
/opt???
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
Fernando Perez wrote in post #981446:
> All in all, even if I had to endure a bit of trial and error, I really
> like the way rvm works and keeps things confined.
>
> If one day my ruby and/or gems go South I can simply rm -r ~/.rvm and
> everything goes away so that I can start a fresh install in
Didn't see that, thanks.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
Frederick,
because the "purchase_type" column would still be in the "payments"
table, like in usual polymorphic association.
I am in fact questioning myself if there are any benefits over the usual
polymorphic association.
I thought at first that it would be nice to be able to delete purchases
On 6 May 2011, at 15:35, MEDARKNESS wrote:
> Hi everyone, i'm having a little trouble understanding how rails
> (rake) loads the different files and gems and environnement? for
> example i'm trying to run a resque worker :
> QUEUE=testqueue resque:work
> and the problem is that when i do that
My partner and I have are funding a company with an innovative social
media idea that will interact with facebook and twitter, providing a
platform for user interaction that does not currently exist on the
web. We have the capital to get off the ground, office space, etc. as
well as the venture ca
Hi everyone, i'm having a little trouble understanding how rails
(rake) loads the different files and gems and environnement? for
example i'm trying to run a resque worker :
QUEUE=testqueue resque:work
and the problem is that when i do that the worker doesn't find the
Classes that it should run
i
On 6 May 2011, at 15:44, Alexey Muranov wrote:
> Bill, i see no theoretical difficulty in implementing what i want, i was
> just wondering why it is not implemented in Rails (whether it is
> considered a "bad style" for some reason).
>
> The same way as one does
>
> class Payment < ActiveRe
On 6 May 2011, at 17:38, amrit pal pathak wrote:
> i am using rails -v 3.0.7.when i tried "rails generate scaffold try
> name:string number:decimal" , it gave following error message
> invoke active_record
> /usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 7, col
> 2: ` pool: 5
Well then you can simply loop through each item in the returned array, then
loop through the values in the attributes hash for each item.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-ta
Hi Tim, thank you for your fast response.
I actually don't care about the name of the keys. Just need to find a
way to aggregate the values of each object in csv format.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Rub
i am using rails -v 3.0.7.when i tried "rails generate scaffold try
name:string number:decimal" , it gave following error message
invoke active_record
/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 7, col
2: ` pool: 5' (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in `l
Your find_by_sql call is going to return an array of Keyword objects.
Each object has an "attributes" hash that contains the attributes.
You can check the keys for that hash and it should tell you which attribute
names are available.
For example:
posts = Post.find_by_sql("select title, active
I am on a project which has been writing acceptance tests in Cucumber which
drives the application via capybara and celerity. The tests have been
getting more and more flaky over time as celerity frequently looses it
connection to HTML Unit. I am looking for suggestions on more stable web
dri
I have an object array @keywords = Keyword.find_by_sql(sql). Now I need
to write all values of @keywords to a csv file, and because the sql
statement is dynamically generated, hence the attribute names are
dynamic too. How can I do it?
Please help!
Thanks!
--
Posted via http://www.ruby-forum.co
Of course i can also do
class Payment < ActiveRecord::Base
has_one :ticket_purchase
has_one :membership_purchase
def purchase
case purchase_type
when "TicketPurchase" then ticket_purchase
when "MembershipPurchase" then membership_purchase
end
end
end
Al
Hello all,
When I have a syntax error accessing my model's index action the
server shows an SQL call to load an all of that model. Since there are
700k+ entries, this always causes a crash.
This ONLY happens the app goes into error catching mode.
I have traced the query to using this method
htt
Bill, i see no theoretical difficulty in implementing what i want, i was
just wondering why it is not implemented in Rails (whether it is
considered a "bad style" for some reason).
The same way as one does
class Payment < ActiveRecord::Base
belongs_to :purchase, :polymorphic => true
end
never mind ... i upgraded to rails 3.0.7 it seems to work.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe
Hi,
So I open a little test jquery dialog to do some stuff but the thing
is only stuff within a form actually show.
For example my code for the page that is rendered is:
hello PRE
<%= form_tag close_now_escalation_path, :id => 'close_escalation' do
%>
<%=@escalation.id%>
hello POST
<%= submit
Who is in charge of this LAN? Do you have space on a server on that
LAN, do you have root or sudo in that space, and are you sure it's
Windows-based? Does it have to be on the LAN, or could you use Heroku
or another simple hosting service (and SSL, if security is your issue)
instead?
Walt
Maybe you're looking for something along the lines of @import?
http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#import
regards,
Paulo Muggler
On Fri, May 6, 2011 at 06:11, Tomas Celizna wrote:
> Hello all,
>
> in Rails 3.1, is it possible to define global SASS variables (and mixins)
On 6 May 2011 14:15, sukesh wrote:
> I want to deploy my rails app on my college LAN and use it as a
> intranet site. I am MAC user so i dont know much about configuring
> windows to run the rails app as intranet site. I currently have a
> rails app with mysql database and webrick server. Can anyo
Hi Alexey,
On Fri, May 6, 2011 at 6:59 AM, Alexey Muranov wrote:
> Thanks Bill,
> i am aware of the alternatives, but i was wondering if i can keep this
> database schema which i like for that case, and to still be able to use
>
> payment = Payment.find(1)
> puts payment.purchase.inspect
>
> so
Thank for this url. I didn't know what is web-based retail Point Of Sale and
now i know.. humm more or less like a e-commerce, m-commerce.
Execuse any english errors, but i learning.
2011/5/6 News Aanad
> @Peter Bell
>Thanks buddy...
> @ Carina Brito
>you can google as"Retail Po
Hello,
I want to deploy my rails app on my college LAN and use it as a
intranet site. I am MAC user so i dont know much about configuring
windows to run the rails app as intranet site. I currently have a
rails app with mysql database and webrick server. Can anyone help me
with this?
--
You recei
have a table form the second table
class Dzhfeed < Dzxdb
set_table_name "pre_home_feed"
set_primary_key :feedid
end
but this table has another column named 'id' and not a primary_key
I don't know how to create a new Dzhfeed
--
Posted via http://www.ruby-forum.com/.
--
You received this
For this route
edit_operator_profile GET /operator_profile/:id/edit(.:format)
{:action=>"edit", :controller=>"operator_profile"}
Below is wrong
<%=link_to('Profile',:controller => "operators_profile",:action
=>"edit")%>
Correct will be
<%=link_to('Profile',:controller => "o
You can use an event to start and stop your poller. use the open4 gem to
start a subprocess that gives the pid then use "kill 'TERM', pid" to stop
it. Open4.popen4 will do the trick. You would have to do Process.detach(pid)
after popen, else you will have harmless defunct zombie processes hanging
a
Just a couple of points to add - might be typos in the post, or may be
relevant to your controllers
On May 5, 1:20 pm, Clem Rock wrote:
> Update:
>
> I realized I should also attempt to go w/ a operations_controller
> instead of the operator_profile_controller. So I did that and I now
> ha
Hi Tomas,
Tomas R. wrote in post #996935:
> ...
> NOTE: Gem::SourceIndex#all_gems is deprecated with no replacement. It
> will be removed on or after 2011-10-01.
> Gem::SourceIndex#all_gems called from
>
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:256
A
I am thinking to implement using Thread class, but is there any other way
which is reliable or stable to implement this task?
On Fri, May 6, 2011 at 5:39 PM, Tim Shaffer wrote:
> You could put the start-up code for your Poller in an initializer.
>
> --
> You received this message because you are
You could put the start-up code for your Poller in an initializer.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
ruby
Hi, I am implementing Amazon's SQS service in My Rails application.
I am trying to make a Poller which will continuously monitor the incoming
Queue.
What I want to do is when I start my rails server the Poller should be start
and start monitoring the incoming queue.
Which is the best way to implem
We're doing one more release candidate to update rspec-rails to work with
rails-3.1.0.beta1. This will hopefully be the last release candidate, with a
final release coming in just a few days.
### rspec-rails-2.6.0.rc6
full changelog:
http://github.com/rspec/rspec-rails/compare/v2.6.0.rc4...v2.
Thanks Bill,
i am aware of the alternatives, but i was wondering if i can keep this
database schema which i like for that case, and to still be able to use
payment = Payment.find(1)
puts payment.purchase.inspect
so that payment.purchase was either TicketPurchase or
MembershipPurchase, while t
Hi Alexey,
On Fri, May 6, 2011 at 5:21 AM, Alexey Muranov wrote:
> Hello,
>
> i wonder if the following is possible in Rails (seems like not), and if
> not, whether such database structure is discouraged for some good
> reason.
>
> I *roughly* want to have
>
> class Payment < ActiveRecord::Base
Thank you, I got it now =), I didn't know that inside if evaluations
counted.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send ema
I don't have any Rails example code, but I built something like this
once using Scriptaculous autocompleter to put authors or books into
groups. Type a group name, choose one from the autocompleted list, and
if you want to add another association, press a New button to add
another group (wi
Hello,
i wonder if the following is possible in Rails (seems like not), and if
not, whether such database structure is discouraged for some good
reason.
I *roughly* want to have
class Payment < ActiveRecord::Base
has_one :purchase
end
where purchase can be either TicketPurchase, or Memb
# product.rb
class Produtct < AR::Base
end
require_dependency 'book'
require_dependency 'movie'
# movie.rb
class Movie < Product
end
# book.rb
class Book < Product
end
This works fine for me in development and production.
1. Development:
a) Request comes
b) you call Product.dependencies()
c) re
Hello all,
in Rails 3.1, is it possible to define global SASS variables (and mixins)
that are shared across all *.css.scss files?
I am able to define SASS variables, yet they seemed to be scoped only within
each individual file …
On a side note -- is there a way to pass variables from my Rails
Hi,
Does anyone knows a good example (with code for controller and view) for an
HABTM relation?
Hi have two big tables (cars and pieces). A car can have a lot of pieces, so
the usual checkbox example used for HABTM is not a good one. Unless it could
be possible to search, paginate, etc the values
Senior Software Engineer - Ruby on Rails
Opportunity to join a fast-moving, Agile team in one of the industry's
hottest sectors. Our client is looking for a sharp, experienced
individual to make an immediate impact on our team. This role will
work directly with the CTO on implementation strategy
Google is your friend, but let me just post the result of the 30
seconds of entering the right keywords in a search engine gave me.
On 06 May 2011, at 08:43, Quijote70 wrote:
I'm preparing a new site web, could you suggest me what technology use
to:
- render a diferent page depending of the
Hi all, I'm trying to track down a memory spike in my application that
happens when processing an XML file that's uploaded.
I created a new rails 2.3.10 app with a single index action that does
nothing other than rendering some text, and posted a 1.1 meg XML file
to the action. Immediately, my ra
John,
RestClient is a thin wrapper fot Net::HTTP standard library
http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html
And it assumes that you already know how to use it and why; it just
simplifies (if you know how to use Net::HTTP) usage of Net:HTTP.
My advice is instead of getting
On 5 May 2011, at 18:51, Fearless Fool wrote:
> Fearless Fool wrote in post #996869:
>> So my next approach will be some magick with const_defined? -- this time
>> for sure!!! ;)
>
> I tried that and now I'm really confused. @Fred: would you expect it to
> be the case that:
>
> class Meter
On 6 May 2011, at 01:38, "juzzy.au" wrote:
> Hey everyone,
>
> I've been trying to get to this page
> http://wiki.rubyonrails.org/rails/pages/HowToConfigureIIS7
> for about a week and the wiki has been down.
>
> Is it down forever? Is there a mirror site for it? (I couldn't find
> one)
>
La
On 6 May 2011, at 01:53, John Merlino wrote:
> Hey all,
>
> I see this line of code:
>
> RestClient.send(verb, url, parameters)
>
> Basically there's two rails application that communicate with each
> other. RestClient is a rails gem. Here we send the get http verb and a
> url string comprisi
Optoro—a rapidly growing e-commerce and software business—is looking
for a Front-End Web Developer and a Back-End Web Developer to help us
expand our suite of Ruby-on-Rails-based web applications.
Successful candidates will join an energetic, creative, and forward-
thinking team in creating dynamic
Hi Everybody,
I m having problem in adding a graph generated by Gruff into a PDF
file.
Here is my graph method in controller:
def line_graph
g = Gruff::Line.new
g.title = "My Graph"
g.data("Apples", [1, 2, 3, 4, 4, 3])
g.data("Oranges", [4, 8, 7, 9, 8, 9])
g.labels = {0 => '2003', 2 => '2004', 4
Hi Friends
Hope you are doing well.
As I am working on a Direct client requirement , noticed your resume
and wanted to contact you regarding an opportunity.
Please go through the requirement and let me know your interest.
Please mail me back at :prabhak...@evantagetechnologies.com
Note: Lookin
Hey everyone,
I've been trying to get to this page
http://wiki.rubyonrails.org/rails/pages/HowToConfigureIIS7
for about a week and the wiki has been down.
Is it down forever? Is there a mirror site for it? (I couldn't find
one)
I've tried other posts on configuring RoR and I've done all that bu
83 matches
Mail list logo