I have a gem, and part of the gem is a piece of rack middleware. In
Rails 2.3, I could make the gem set up the middleware without adding
anything to config/*.rb in the app. I did this with the following
line:
ActionController::Dispatcher.middleware.use 'MyMiddleware'
But in Rails 3, this doesn't
say for instance,
i have a validation on
validates first_name, :presence => true
--
First Name: can't be blank | | can't be
blank
-
Hi,
I have used "link_to_remote" helper quite many times as like:-
<%= link_to_remote "Q1", :url => { :controller => "", :action =>
"", :year => 2012 }, :update => 'div_name' %> which is having source
as:-
«
Today also i used the same syntax and semantic, but surprised to see
that same help
try to install those packages
yum install gcc gcc-c++
and install ruby then rails. or install usign rvm http://beginrescueend.com/
Ahmy Yulrizka
On Thu, Jan 12, 2012 at 12:50 PM, sachin kewale wrote:
> hi all,
>i am trying to install Ruby on rails on Centos,but giving following
> error f
hi all,
i am trying to install Ruby on rails on Centos,but giving following
error for gcc complier
"gcc compiler is missing"
is there any other alternative to install Ruby on rails on Centos or
steps to install ruby on rails on Centos ?
--
Thanks
Sachin S. Kewale
--
You received this m
Hi All,
I am new to ruby on rails and i am able to select the value from select
box but after reloading the page the select box selected value is not
selected, please help me...
Thanks in Advance.
This is the code what i am using
<%= select("rnotes", "project_vno", Version.find(:all, :conditio
When you click [x] the close button, will show the alert with 3 button
like below picture:
Show dialog message
=
Do you want to save changes?
All details will be lost if you don't save them.
Dont' save | cancel | save
I'm sorry if these are very simple questions, I just haven't been able
to find useful answers for my problems.
I've been programming in Ruby for a couple years, and recently started
with Rails (having felt most of Ruby seems to be in that direction,
these days), so I have a reasonable amount of kn
On Wed, Jan 11, 2012 at 06:07, Ahmy Yulrizka wrote:
> simple solution is
>
> change it to :
>
> var_i * (numb_i || 0)
Even simpler solution is to initialize the variable first. But with
that approach, you should do them all -- the current solution will
barf on the first digit past the one that
On Tue, Jan 10, 2012 at 04:36, Heike wrote:
> I've got a bunch of campaigns I wish to render into an index-page.
> Two diagrams have to be in each campaign (jQuery). One of them
> requires a database query within a loop (the finished orders for each
> day of one week).
>
> Since its bad code to p
On Jan 11, 2:52 pm, Colin Law wrote:
> So the question is, what is the difference between
> bundle pack
> and
> bundle install --path vendor/cache
>
> Colin
I found the pack command in "Agile Web Development with Rails", fourth
edition on page 235. I stumbled across the install command while
On Wed, Jan 11, 2012 at 4:27 PM, Josh J. wrote:
> When I run:
> rails new
>
> I get the following error:
> Fetching source index for http://rubygems.org/
> Could not reach rubygems repository http://rubygems.org/
> Could not find gem 'turn (>= 0) x86-mingw32' in any of the gem sources
> listed i
On Jan 11, 10:21 am, Stan Kaufman wrote:
> Something in the latest iteration of spork, guard, or rspec now causes
> all examples to be run, not just tagged examples (say, with :focus =>
> true).
Hmm...looks like this is a spork vs rspec problem; the behavior occurs
without involving guard:
- rsp
Yes, and yes, I already tried that first. I get the correct ruby in any script
I run in there, but I don't see the nokogiri gem, even though it's listed
correctly in gem list.
Walter
On Jan 11, 2012, at 1:58 PM, Michal Papis wrote:
> are you sure you run stable rvm ?
>
>rvm get stable
>
When I run:
rails new
I get the following error:
Fetching source index for http://rubygems.org/
Could not reach rubygems repository http://rubygems.org/
Could not find gem 'turn (>= 0) x86-mingw32' in any of the gem sources
listed in your Gemfile.
I think the problem is that I'm behind a proxy.
are you sure you run stable rvm ?
rvm get stable
also you can use one of rubies listed by:
ls -1 $rvm_path/wrappers/*/ruby
just put the full path instead of ruby in the 'Run Command':
ruby $filename
On Jan 11, 6:24 pm, Walter Lee Davis wrote:
> On Jan 10, 2012, at 10:54 PM, ruij
tvw wrote in post #1040336:
> today I went into a problem, when I had to iterate over a big result
> set. ActiveRecord produces a huge array of model instances, which
> consumed 1GB of memory on my machine. A comparable perl DBI script
> only used some KB for iterating over the result set.
It is w
Robert Walker wrote in post #1040404:
> $(function() {
> $('#fieldset').click(function() { alert("Clicked"); });
> });
>
> If this works then you know you're finding the right HTML element and
> correctly binding a "click." Once you've confirmed this then try the
> more complex bind syntax.
If y
On 11 January 2012 18:06, jsnark wrote:
>
>
> On Jan 11, 11:55 am, Colin Law wrote:
>
>> Because that is what bundle install is for, to install the appropriate
>> gems as defined by Gemfile and gemfile.lock.
>> The one thing I am not sure of is why it did not work when the gems
>> were already in
Hans Marmolin wrote in post #1040373:
> $(document).ready(function() {
> $('#fieldset').bind({
> click: function() {
> alert('Change');
> // do something on click
> },
> mouseenter: function() {
> // do something on mouseenter
> };
> });
> });
> But nothing happens when I click i
Something in the latest iteration of spork, guard, or rspec now causes
all examples to be run, not just tagged examples (say, with :focus =>
true). This was posted as an issue for rspec:
https://github.com/dchelimsky/rspec/issues/47
But when running the same command that guard generates in verbos
Hi Hans,
On Wed, Jan 11, 2012 at 10:35 AM, Hans wrote:
> I tries to observe a change in a field with jquery in Rails 3.1 in
> order to be able to implement two cascading select boxes.
> A a first step I just try to observe a click in a div using jquery
> I have the following function in a .js
On Jan 9, 7:14 pm, RobboRex wrote:
>
> SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
> certificate verify failed
>
> I've had it before and fixed it by downloading certificates and
> setting the path but that was using omniauth-facebook and on linux.
> Please don't tell me
On Jan 11, 11:55 am, Colin Law wrote:
> Because that is what bundle install is for, to install the appropriate
> gems as defined by Gemfile and gemfile.lock.
> The one thing I am not sure of is why it did not work when the gems
> were already in vendor/cache. How did you get them there in the
Thank you. I will take a look at it.
On Jan 11, 3:04 pm, Colin Law wrote:
> On 11 January 2012 11:07, Ahmy Yulrizka wrote:
>
>
>
>
>
>
>
>
>
>
>
> > Ahmy Yulrizka
>
> > On Wed, Jan 11, 2012 at 1:43 AM, Loren wrote:
>
> >> ...
> >> puts var_m * numb_m + var_d * numb_d + var_c * numb_c + var_l
On Jan 10, 2012, at 10:54 PM, ruijie chen wrote:
> hello, you can change the Languages preferences 'Run Command' from:
> ruby $filename
> to:
> [[ -s /Users/__yourname__/.rvm/scripts/rvm ]] && source
> /Users/__yourname__/.rvm/scripts/rvm && ruby $filename
>
> pls change __yourname__ to your h
On 9 ene, 21:05, Mohamad El-Husseini wrote:
> Started learning Ruby and RoR a couple of days ago and I'm working on a
> dummy app.
>
> I want to allow a user to save 5 records at the same time using a single
> form. Let's assume "contact" records, with each one consisting of a single
> "name" fi
On 11 ene, 10:24, Kapil Kaligotla
wrote:
> I am new learner in rails, i am using rails 3.0.10 . I want to use the
> date and and time in my project, please tell me the better way to use
> it
Maybe, you should take a look at this
http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.
On 11 January 2012 16:09, jsnark wrote:
> I am using capistrano v2.9.0 to deploy to a ubuntu server running
> apache v2.2.12, passenger v3.0.4, ruby v1.9.2 and rails v3.0.1. When
> I deploy a new application, I often get error messages like:
>
> Could not find net-ssh-2.2.2 in any of the sources
Correction. I'm actually running rails v3.0.7.
--
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+unsubs
I tries to observe a change in a field with jquery in Rails 3.1 in
order to be able to implement two cascading select boxes.
A a first step I just try to observe a click in a div using jquery
I have the following function in a .js file that is loadedin the head
section (fieldset is the id of a d
I am using capistrano v2.9.0 to deploy to a ubuntu server running
apache v2.2.12, passenger v3.0.4, ruby v1.9.2 and rails v3.0.1. When
I deploy a new application, I often get error messages like:
Could not find net-ssh-2.2.2 in any of the sources
(Bundler::GemNotFound)
The missing gem is actuall
On 11 January 2012 13:24, Kapil Kaligotla
wrote:
> I am new learner in rails, i am using rails 3.0.10 . I want to use the
> date and and time in my project, please tell me the better way to use
> it
Time.now will return the current date and time if that is what you mean.
Have a look at the docs f
On 10 January 2012 22:23, Mohamad El-Husseini wrote:
> Another newbie question. My dummy app has the following models:
>
> class User < ActiveRecord::Base
> has_one :list
> end
>
> class List < ActiveRecord::Base
> belongs_to :user
> has_many :celebs
> end
>
> class Celeb < ActiveRecord::Bas
On 11 January 2012 11:07, Ahmy Yulrizka wrote:
>
> Ahmy Yulrizka
>
>
> On Wed, Jan 11, 2012 at 1:43 AM, Loren wrote:
>>
>> ...
>> puts var_m * numb_m + var_d * numb_d + var_c * numb_c + var_l *
>> numb_l + var_x * numb_x + var_v * numb_v + var_i * numb_i
>
>
> this line interpret as var_i * ni
What does your view look like? Do you have any error message related code
in there?
What does the output HTML look like? Is the error message repeated in the
HTML?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To view this discussion
Hi,
I used the below syntax in config/initializers, but i am getting
the error message two times, please suggest me the better way to over
come it
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
if html_tag =~ /<(input|label|textarea|select)/
error_class = 'error'
I am new learner in rails, i am using rails 3.0.10 . I want to use the
date and and time in my project, please tell me the better way to use
it
--
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 rubyonrai
You can try This way
@user.includes(celebs)
Sent from my iPad
On 11/01/2012, at 08:50, Peter Vandenabeele wrote:
> On Tue, Jan 10, 2012 at 11:23 PM, Mohamad El-Husseini
> wrote:
> Another newbie question. My dummy app has the following models:
>
> class User < ActiveRecord::Base
> has_one
Ahmy Yulrizka
On Wed, Jan 11, 2012 at 1:43 AM, Loren wrote:
> def romnum leftover
>var_i = 'I'
>var_v = 'V'
>var_x = 'X'
>var_l = 'L'
>var_c = 'C'
>var_d = 'D'
>var_m = 'M'
>
>leftover = ''
>
>leftover = gets.chomp
>
>numb_m = leftover.to_i / 1000
>l
On Tue, Jan 10, 2012 at 11:23 PM, Mohamad El-Husseini <
husseini@gmail.com> wrote:
> Another newbie question. My dummy app has the following models:
>
> class User < ActiveRecord::Base
> has_one :list
>
Try to add here:
has_one :list_with_celebs, :class_name => "List", :include => :c
Here are good example
http://railscasts.com/episodes/73-complex-forms-part-1
Ahmy Yulrizka
On Tue, Jan 10, 2012 at 7:05 AM, Mohamad El-Husseini wrote:
> Started learning Ruby and RoR a couple of days ago and I'm working on a
> dummy app.
>
> I want to allow a user to save 5 records at the same
Redcar open the redcar editor u just choise open diretory and choise u
projetc to tree :)
2012/1/9 Mathew S.
> How do you open Rails up with Aptana and or Redcar through the "Command
> Prompt with Ruby and Rails"?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message
One and all, I have scoured the internet high and low tonight and I
can not for the life of me fix this damn problem. I have downloaded
certificates, installed certificates, changed my :ca_path and such as
stated in the documentation for omniauth-facebook for which I thought
would be ok to do with
Started learning Ruby and RoR a couple of days ago and I'm working on a
dummy app.
I want to allow a user to save 5 records at the same time using a single
form. Let's assume "contact" records, with each one consisting of a single
"name" field. It's a "user has_many contacts" relationship.
Any
Hi,
I've got a bunch of campaigns I wish to render into an index-page.
Two diagrams have to be in each campaign (jQuery). One of them
requires a database query within a loop (the finished orders for each
day of one week).
Since its bad code to put a database query in the view, and I dont
want to
Another newbie question. My dummy app has the following models:
class User < ActiveRecord::Base
has_one :list
end
class List < ActiveRecord::Base
belongs_to :user
has_many :celebs
end
class Celeb < ActiveRecord::Base
belongs_to :list
end
I want to load a user's list, and include the cel
I just started to teach myself ruby as a first language from Chris
Pines's book. There is a exercise to write a program that will
translate arabic numbers to old style roman numbers.
I have completed the exercise and my code is works but only if I type
in numbers that are not divisible by 5. As soo
Hi,
today I went into a problem, when I had to iterate over a big result
set. ActiveRecord produces a huge array of model instances, which
consumed 1GB of memory on my machine. A comparable perl DBI script
only used some KB for iterating over the result set.
Then I was suggested to use batch (#fi
I had a patch that I was working on prior to the 3.2 RC drops. I
updated my fork which is now on 4.0.0.beta and can't get bundle
install to complete. It dies on the jquery-rails gem install because
of the railties ~> 3.0 dependency. Any help on getting 4.0.0.beta up
and running would be much apprec
50 matches
Mail list logo