Re: [Rails] Mongrel starting Error

2011-03-03 Thread Bryan Crossland

On Mar 3, 2011, at 11:17 PM, DHAMODHARAN N  wrote:

> yes its Exist.

What directory are you starting mongrel from and in that directory is there a 
folder called log with mongrel.log in it? It may be that where you see the log 
is not where Mongrel thinks it is.

B.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] DEPRECATION WARNING: error_messages_for was removed from Rails.

2011-03-03 Thread Bryan Crossland

On Mar 3, 2011, at 7:37 PM, Gaba Luschi  wrote:

> Hi,
> 
> When I tried to add in an error_messages_for into one of my files and
> loaded the site, I got this error:
> 
> DEPRECATION WARNING: error_messages_for was removed from Rails and is
> now available as a plugin. Please install it with `rails plugin install
> git://github.com/rails/dynamic_form.git`. (called from block in
> _app_views_stories_new_html_erb__738440331_32228400_528958273 at
> c:/Users/owner/shov_app/app/views/stories/new.html.erb:2)
> 
> I installed the plugin, but even after restarting the server several
> times, I still get the same error.  Suggestions for what I might be
> doing wrong?
> 

Have you required the plugin in your code? If not, your code is still going to 
use the old code that is in rails even though it is deprecated.

B.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problems with Sqlite3 and apt-get

2011-03-03 Thread Scott L Gu

After I re-installed Ruby, 'rails console' works. Really appreciate
your helps, Frederick !

Scott


On Mar 3, 6:32 am, Frederick Cheung 
wrote:
> On Mar 3, 1:44 pm, Scott L Gu  wrote:
>
>
>
>
>
> > Thanks, Frederick, it works. I can go one step further now.
>
> > However, I still have a problem with "rails console":      `require':
> > no such file to load -- readline (LoadError)
>
> > I saw some solution to do :    yum install ncurses-devel readline-
> > devel
>
> > I did it. However, the next steps should be :
>
> > cd /ext/readline
> > ruby extconf.rb
> > make && make install
>
> > But I cannot find ext/readline in my ruby directory: /home/ec2-
> > user/.rvm/rubies/ruby-1.9.2-p180/
> > and don't know where this extconf.rb should be :-)
>
> it will be where the source code for ruby is. Seeing as you are using
> rvm, the easiest thing is probably to ask rvm to reinstall ruby for
> you - it should build the readline extension automatically now that
> the readline development package is installed.
>
> Fred- Hide quoted text -
>
> - Show quoted text -

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Mongrel starting Error

2011-03-03 Thread DHAMODHARAN N
yes its Exist.

On Fri, Mar 4, 2011 at 10:46 AM, DHAMODHARAN N  wrote:

> Ya its exit?
>
>
> On Thu, Mar 3, 2011 at 11:46 PM, Frederick Cheung <
> frederick.che...@gmail.com> wrote:
>
>>
>>
>> On 3 Mar 2011, at 09:16, DHAMODHARAN N  wrote:
>>
>>
>> Hello friends!
>>
>> When i tried to start my server arising this error, currently i using
>> rails 2.3.2. If any one know what is reason suggestion me.
>>
>>  $ mongrel_rails start
>> !!! Path to log file not valid: log/mongrel.log
>> mongrel::start reported an error. Use mongrel_rails mongrel::start -h to
>> get help
>>
>>
>> Does the log folder exist?
>>
>> Fred
>>
>>
>>
>>
>> Thanks & Regards,
>> Dhamodharan.N
>>
>> --
>> 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.
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>  --
>> 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.
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Mongrel starting Error

2011-03-03 Thread DHAMODHARAN N
Ya its exit?

On Thu, Mar 3, 2011 at 11:46 PM, Frederick Cheung <
frederick.che...@gmail.com> wrote:

>
>
> On 3 Mar 2011, at 09:16, DHAMODHARAN N  wrote:
>
>
> Hello friends!
>
> When i tried to start my server arising this error, currently i using rails
> 2.3.2. If any one know what is reason suggestion me.
>
>  $ mongrel_rails start
> !!! Path to log file not valid: log/mongrel.log
> mongrel::start reported an error. Use mongrel_rails mongrel::start -h to
> get help
>
>
> Does the log folder exist?
>
> Fred
>
>
>
>
> Thanks & Regards,
> Dhamodharan.N
>
> --
> 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.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>  --
> 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.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: elationship between ruby on rails and html/css?

2011-03-03 Thread Gaba Luschi
don't worry - I'm not offended at all.  I realize I'm a total beginner 
and I'm ok with that.  I'm currently working through a book and have 
already managed to create a hideous but functional page!  Thanks for the 
helpful responses re: tutorials, and explaining the relationship btwn 
Ruby/Rails and HTML/CSS.  I just spent the last week learning html/css, 
some basic ruby and now rails.  I'm definitely still far far behind but 
at least understand the concepts better, so I appreciate all the help so 
far!

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] DEPRECATION WARNING: error_messages_for was removed from Rails.

2011-03-03 Thread Gaba Luschi
Hi,

When I tried to add in an error_messages_for into one of my files and
loaded the site, I got this error:

DEPRECATION WARNING: error_messages_for was removed from Rails and is
now available as a plugin. Please install it with `rails plugin install
git://github.com/rails/dynamic_form.git`. (called from block in
_app_views_stories_new_html_erb__738440331_32228400_528958273 at
c:/Users/owner/shov_app/app/views/stories/new.html.erb:2)

I installed the plugin, but even after restarting the server several
times, I still get the same error.  Suggestions for what I might be
doing wrong?

Thanks!

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Example of work with mongo

2011-03-03 Thread Hassan Schroeder
On Thu, Mar 3, 2011 at 4:41 PM, Manny 777  wrote:

> The connection among Rails and MongoDB works, but I don't know, how to
> print only one "column" from document.
>
> puts db["testCollection"].find_one().inspect
>
> So I'will get the entire structure of BSON, as:
>
> {"_id"=>#, "name"=>"MongoDB",
>  "info"=>{"x"=>203, "y"=>102}, "type"=>"database", "count"=>1}
>
> But I would like to ask you, how is possible to get only the item eg
> "name"... I am searching this information a long time, but no result
> yet...

  db["testCollection"].find_one['name']

Hint: `db["testCollection"].find_one.methods.sort` will give you a lot
of useful information...

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Example of work with mongo

2011-03-03 Thread Manny 777
Hi there,
 I'm newbie here and I have a problem with the connection with MongoDB.
The connection among Rails and MongoDB works, but I don't know, how to
print only one "column" from document.
If I'm trying following a part of code:

puts db["testCollection"].find_one().inspect

So I'will get the entire structure of BSON, as:

{"_id"=>#, "name"=>"MongoDB",
 "info"=>{"x"=>203, "y"=>102}, "type"=>"database", "count"=>1}


But I would like to ask you, how is possible to get only the item eg
"name"... I am searching this information a long time, but no result
yet...


I will very glad for everything help, thanks a lot!

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Nested forms validation problem

2011-03-03 Thread Dan Th
OK so I have had a bit of a breakthrough - the form works great when the 
association is changed to has_many rather than has_one

What do I need to change to get this working for a has_one association?

Thanks in advance!

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Help hacking AR timestamps

2011-03-03 Thread Kendall Gifford
I have a specific need to hack active record migrations for MySQL so that 
:timestamp fields will map to MySQL TIMESTAMP columns (instead of DATETIMElike 
they do now). I first tried monkey-patching active record with an 
initializer, then with a gem that uses a railtie. After consistent failure 
(and after attending my local ruby user group meeting last night) it was 
suggested to me that I just try directly editing my copy of the active 
record gem to see if the stuff I'm changing is even correct for what I'm 
trying to accomplish.

I took their advice and directly edited the 
lib/active_record/connection_adapters/mysql_adapter.rb file like so:

  NATIVE_DATABASE_TYPES = {
:primary_key => "int(11) DEFAULT NULL auto_increment PRIMARY 
KEY".freeze,
:string  => { :name => "varchar", :limit => 255 },
:text=> { :name => "text" },
:integer => { :name => "int", :limit => 4 },
:float   => { :name => "float" },
:decimal => { :name => "decimal" },
:datetime=> { :name => "datetime" },
:timestamp   => { :name => "timestamp" }, # "datetime" ==> 
"timestamp"
:time=> { :name => "time" },
:date=> { :name => "date" },
:binary  => { :name => "blob" },
:boolean => { :name => "tinyint", :limit => 1 }
  }

The complete log of everything I did is here: http://gist.github.com/853701

It *still* doesn't work. Their advice was good as clearly I'm not even 
changing the right stuff to make this happen!

Anyone know what I need to change so my :timestamp fields in my migrations 
will create TIMESTAMP columns in MySQL? If I can figure out what to change 
then I can make a monkey-patch to do it for my project.

Thanks for your time!

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] which oauth gem to use?

2011-03-03 Thread boo boo
Does any1 have any recommendations for an oauth gem. I am trying to
create a twitter proxy. I'm not sure which oauth gem to use. Thanks in
advance!

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Functional test default methods

2011-03-03 Thread Colin Law
On 3 March 2011 21:57, djangst  wrote:
> Given a route "resources :orders," why does the following (generated)
> functional test using a GET request work? Should it?
>
>  # test/functional/orders_controller_test.rb
>  test "should get create" do
>    get :create # create action supports request method other than
> POST?
>    assert_response :success
>  end
>
> It isn't really a problem, I'm just curious if I'm missing something.

If I am interpreting the output from rake routes correctly then an
attempt to run a create action with GET will actually call the index
action, so it should succeed.

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: elationship between ruby on rails and html/css?

2011-03-03 Thread dana tassler
Having just graduated from college as a Programmer/Analyst, I can
certainly say there is no shortage of lazy students.  One "peer" would
not spend more than five minutes on any problem before attempting to
either steal the answer from a classmate or get a tutor to do his own
work.

Sorry to "steal" the thread, but had to throw in my $0.02.

And I second using railstutorial.org, I'm presently working through
the text myself and I like it.

On Mar 3, 3:43 pm, Colin Law  wrote:
> On 3 March 2011 21:34, gezope  wrote:
>
> > Hi, to be honest being rude with beginners is unnecessary. Maybe he
> > has no idea where to start - and a mailing list can be a right place.
>
> I hope you are not suggesting that asking whether a question is
> homework is being rude.  It is a perfectly valid question and many
> times questions like this are in fact homework.  I hope the OP was not
> offended by my asking, certainly no offence was intended.
>
> I accept that you have not quoted me, so it should not be me that you
> are referring to, but none of the replies that you have quoted look
> rude either.
>
> Colin
>
>
>
> > You can find all HTML standards here:http://www.w3schools.com
> > If you don't know where to start the best is try out everything
> > yourself and you will find that part which impresses you.
>
> > Rails is a framework which generates HTML. It communnicates with
> > Database so it's definitely not static like HTML itself. CSS if for
> > giving some styling and Rails also generates some CSS and enables you
> > to modify it as you wish. Later you can include great frameworks too
> > and you can avoid boring repetition of same tasks (like HAML, SCSS,
> > BluePrint, Compass).
>
> > Rails can be hard as starting point if you have no idea about HTML,
> > CSS, JavaScript. You can pick up everything on the way but it can take
> > much more time. Preferably you spend some time with these then you
> > restart studying a little bit of Ruby and then continue with Rails.
> >www.railstutoial.orgThis guy explains everything what's better to
> > know before starting, the first part will be very helpful for you.
>
> > Best wishes and hope you'll find your way!
> > gezope
>
> > On Mar 2, 5:27 pm, Walter Lee Davis  wrote:
> >> On Mar 1, 2011, at 9:04 PM, radhames brito wrote:
>
> >> > On Tue, Mar 1, 2011 at 2:31 AM, Karthikeyan 
> >> > wrote:
> >> > OK, you put HTML and CSS code into a file and name it something.html ,
> >> > save it and open in a browser and you see a  beautiful web page.
>
> >> > Continuing with what Karthikeyan said , you will see a static
> >> > beautiful page, like a MS word document it will always look the same
> >> > as long as you dont edit it. If this was how gmail worked there
> >> > would be a html document for each user and each action the user can
> >> > do ( hundreds of millions), but that is not the case. Programed on
> >> > the server side is not a fixed html document but  instead there is
> >> > the logic to build one on the fly when someone comes in to check
> >> > their email, so , you only create one server side document and this
> >> > creates a html document dynamically( on the fly) for each user and
> >> > for each action that a user can do, that logic if programed if many
> >> > different languages but ruby makes it easy and the rails framework
> >> > is the one makes this easiest, and most productive.
>
> >> +1000 points for a very helpful and kind answer. Thanks for keeping
> >> the tone of this list high.
>
> >> Walter
>
> > --
> > 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.
> > For more options, visit this group 
> > athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Functional test default methods

2011-03-03 Thread djangst
Given a route "resources :orders," why does the following (generated)
functional test using a GET request work? Should it?

  # test/functional/orders_controller_test.rb
  test "should get create" do
get :create # create action supports request method other than
POST?
assert_response :success
  end

It isn't really a problem, I'm just curious if I'm missing something.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: haml to erb - does it work with new html5 tags?

2011-03-03 Thread gezope
Hey, I made a little test for you:

Modified .html.haml :
  %td#whatif.itworks.fine hm?

Gives this (Right click / Viev source ;P)

hm?

But it's a good question, I'll check HAML soon too ;)

On Mar 2, 7:20 pm, Manoj Sachwani  wrote:
> Thanks Philip!
>
> Yea, I meant to ask that specifically, sorry does it support #foo to
> be converted to a section tag with id foo or something?
>
> On Mar 2, 11:17 pm, Philip Hallstrom  wrote:
>
>
>
>
>
>
>
> > > I wanted to covert all my erb over to haml, but I use HTML5 tags like
> > > nav, section, article, etc. Any idea if this is supported by haml?
> > > Checked out their site, nothing mentioned there or did I miss
> > > something. Sorry noob here.
>
> > HAML doesn't care (at least I don't think so)...
>
> > %div or %nav or %section... they are all just tags...
>
> > Now, whether HAML has special support similar to how "#foo" gets turned 
> > into a div with an id of 'foo' I don't know...
>
> > -philip

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: PayPal notifications - Rails 3.

2011-03-03 Thread Max P.
Anders_P wrote in post #967140:
> Thanks Colin!
>
> You found the root of my problem, the invoice/id was wrong. And thanks
> for the tips regarding Ruby-debug. Still has a lot to learn. :D
>
> // Anders

Hi Anders, I'm having this same problem. Could you tell me what exactly 
was wrong with your invoice/id setup? Thanks, -Max

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: elationship between ruby on rails and html/css?

2011-03-03 Thread Colin Law
On 3 March 2011 21:34, gezope  wrote:
> Hi, to be honest being rude with beginners is unnecessary. Maybe he
> has no idea where to start - and a mailing list can be a right place.

I hope you are not suggesting that asking whether a question is
homework is being rude.  It is a perfectly valid question and many
times questions like this are in fact homework.  I hope the OP was not
offended by my asking, certainly no offence was intended.

I accept that you have not quoted me, so it should not be me that you
are referring to, but none of the replies that you have quoted look
rude either.

Colin

>
> You can find all HTML standards here: http://www.w3schools.com
> If you don't know where to start the best is try out everything
> yourself and you will find that part which impresses you.
>
> Rails is a framework which generates HTML. It communnicates with
> Database so it's definitely not static like HTML itself. CSS if for
> giving some styling and Rails also generates some CSS and enables you
> to modify it as you wish. Later you can include great frameworks too
> and you can avoid boring repetition of same tasks (like HAML, SCSS,
> BluePrint, Compass).
>
> Rails can be hard as starting point if you have no idea about HTML,
> CSS, JavaScript. You can pick up everything on the way but it can take
> much more time. Preferably you spend some time with these then you
> restart studying a little bit of Ruby and then continue with Rails.
> www.railstutoial.org This guy explains everything what's better to
> know before starting, the first part will be very helpful for you.
>
> Best wishes and hope you'll find your way!
> gezope
>
>
> On Mar 2, 5:27 pm, Walter Lee Davis  wrote:
>> On Mar 1, 2011, at 9:04 PM, radhames brito wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > On Tue, Mar 1, 2011 at 2:31 AM, Karthikeyan 
>> > wrote:
>> > OK, you put HTML and CSS code into a file and name it something.html ,
>> > save it and open in a browser and you see a  beautiful web page.
>>
>> > Continuing with what Karthikeyan said , you will see a static
>> > beautiful page, like a MS word document it will always look the same
>> > as long as you dont edit it. If this was how gmail worked there
>> > would be a html document for each user and each action the user can
>> > do ( hundreds of millions), but that is not the case. Programed on
>> > the server side is not a fixed html document but  instead there is
>> > the logic to build one on the fly when someone comes in to check
>> > their email, so , you only create one server side document and this
>> > creates a html document dynamically( on the fly) for each user and
>> > for each action that a user can do, that logic if programed if many
>> > different languages but ruby makes it easy and the rails framework
>> > is the one makes this easiest, and most productive.
>>
>> +1000 points for a very helpful and kind answer. Thanks for keeping
>> the tone of this list high.
>>
>> Walter
>
> --
> 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.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: a twist on polymorphism

2011-03-03 Thread Yoram
I'm staying away from STI because I want to be able to add additional
asset types over time, none of which share attributes with other
assets. So - with STI, I could end up with a table that has hundreds
of columns.

On Mar 3, 1:13 pm, Colin Law  wrote:
> On 3 March 2011 21:10, Yoram  wrote:
>
> > I'm struggling with the following problem:
>
> > I have a class, call it 'School'.
> > An instance of School can have all sorts of assets, such as 'Books',
> > 'Tables', 'Chairs', 'Teachers'.
> > Each of these asset types is modeled by it's own model and has a
> > corresponding table in the db. So, there is a table for 'Chair,
> > another for 'Teacher' and so on.
> > In summary, in the abstract, each school has_many assets and each
> > asset belongs_to a school.
>
> Have you looked at Single Table Inheritance?
>
> Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: migrations in rails?

2011-03-03 Thread ivanpoval
Please, don't forget that the migrations are also provide u a pure
ruby DSL to operate over your DB structure. It means that they are
also independent from the DB driver (oracle or mysql or postgres).
--
Thanks, Ivan Povalyukhin

On Mar 2, 2:18 pm, David Kahn  wrote:
> On Wed, Mar 2, 2011 at 3:59 PM, Gaba Luschi  wrote:
> > Are migrations used only when you're making changes to a database?  Does
> > it just allow the developer to avoid using raw SQL when working with
> > databases?
>
> Right. Not only does it allow the developer to use a much easier (IMO)
> manner to do things like add, modify columns, tables, etc, it also keeps a
> record of the progression of your database schema. Migrations also include
> the ability (assuming it is used) to roll back any changes with a command
> from a terminal. At times a migration may also contain data-transforming
> tasks or really any other ruby code one needs to write to complete the
> migration.
>
>
>
>
>
> > --
> > Posted viahttp://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 from this group, send email to
> > rubyonrails-talk+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: elationship between ruby on rails and html/css?

2011-03-03 Thread gezope
Hi, to be honest being rude with beginners is unnecessary. Maybe he
has no idea where to start - and a mailing list can be a right place.

You can find all HTML standards here: http://www.w3schools.com
If you don't know where to start the best is try out everything
yourself and you will find that part which impresses you.

Rails is a framework which generates HTML. It communnicates with
Database so it's definitely not static like HTML itself. CSS if for
giving some styling and Rails also generates some CSS and enables you
to modify it as you wish. Later you can include great frameworks too
and you can avoid boring repetition of same tasks (like HAML, SCSS,
BluePrint, Compass).

Rails can be hard as starting point if you have no idea about HTML,
CSS, JavaScript. You can pick up everything on the way but it can take
much more time. Preferably you spend some time with these then you
restart studying a little bit of Ruby and then continue with Rails.
www.railstutoial.org This guy explains everything what's better to
know before starting, the first part will be very helpful for you.

Best wishes and hope you'll find your way!
gezope


On Mar 2, 5:27 pm, Walter Lee Davis  wrote:
> On Mar 1, 2011, at 9:04 PM, radhames brito wrote:
>
>
>
>
>
>
>
>
>
>
>
> > On Tue, Mar 1, 2011 at 2:31 AM, Karthikeyan   
> > wrote:
> > OK, you put HTML and CSS code into a file and name it something.html ,
> > save it and open in a browser and you see a  beautiful web page.
>
> > Continuing with what Karthikeyan said , you will see a static  
> > beautiful page, like a MS word document it will always look the same  
> > as long as you dont edit it. If this was how gmail worked there  
> > would be a html document for each user and each action the user can  
> > do ( hundreds of millions), but that is not the case. Programed on  
> > the server side is not a fixed html document but  instead there is  
> > the logic to build one on the fly when someone comes in to check  
> > their email, so , you only create one server side document and this  
> > creates a html document dynamically( on the fly) for each user and  
> > for each action that a user can do, that logic if programed if many  
> > different languages but ruby makes it easy and the rails framework  
> > is the one makes this easiest, and most productive.
>
> +1000 points for a very helpful and kind answer. Thanks for keeping  
> the tone of this list high.
>
> Walter

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Do you agree that as some point, every (big enough) Rails app sould not rely only on ActiveRecord?

2011-03-03 Thread gezope
Hello,

I highly reccomend you DataMapper http://datamapper.org
because its code is beautiful,
have a helpful community http://groups.google.com/group/datamapper
you can immediately change Rails' ORM with this adapter
https://github.com/datamapper/dm-rails

Also you may give a try for NoSQL:
MongoDB or CouchDB

There is not The Best DB and also not any Best ORM for sure. Depends
on your needs. Maybe ActiveRecord has smthg with foreign keys but Rein
gem can solve this issue as I heard(haven't used since I'm fun of DM):
http://github.com/nullobject/rein

cheers,
Zoli


On Mar 2, 6:23 pm, Michel Pigassou  wrote:
> Thank you all for your answers. Tricon your link seems interresting, I'll
> read it tomorrow, 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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] server side HTTP Client (Browser)

2011-03-03 Thread Julian
Hi, 

Is there anything on in RoR or Ruby that can be used as a server side HTTP 
Client. Something like  HTTP Unit and jsdom from NodeJS. 

I'm trying to log into some custom site and scrap the data from them. It would 
be a plus if the client also support javascript. 

Thanks.


Julian

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] a twist on polymorphism

2011-03-03 Thread Colin Law
On 3 March 2011 21:10, Yoram  wrote:
> I'm struggling with the following problem:
>
> I have a class, call it 'School'.
> An instance of School can have all sorts of assets, such as 'Books',
> 'Tables', 'Chairs', 'Teachers'.
> Each of these asset types is modeled by it's own model and has a
> corresponding table in the db. So, there is a table for 'Chair,
> another for 'Teacher' and so on.
> In summary, in the abstract, each school has_many assets and each
> asset belongs_to a school.

Have you looked at Single Table Inheritance?

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] a twist on polymorphism

2011-03-03 Thread Yoram
I'm struggling with the following problem:

I have a class, call it 'School'.
An instance of School can have all sorts of assets, such as 'Books',
'Tables', 'Chairs', 'Teachers'.
Each of these asset types is modeled by it's own model and has a
corresponding table in the db. So, there is a table for 'Chair,
another for 'Teacher' and so on.
In summary, in the abstract, each school has_many assets and each
asset belongs_to a school.

I'd like to be able to do things like:
school = School.find(3)
school.assets << Chair.new(chair_params)
school.assets << Teacher.new(teacher_params)
school.assets.each{|a| puts a.name}

I tried to solve it by defining an abstract class:
class Asset << ActiveRecord::Base
   self.abstract_class = true
end

and inheriting from it:
class Book << Assets
   belongs_to :school
end

and

class School << ActiveRecord::Base
has_many :assets
end

That gets me part way there but I fear is  fundamentally flawed. Most
of the time it results in complaints from raisl that the table
'Assets' doesn't exist, which is true...

Any suggestions on how to model the relationship I described would be
much appreciated!

Yoram

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Nondestructive testing environment on legacy db

2011-03-03 Thread David Kahn
On Thu, Mar 3, 2011 at 2:56 PM, Jason Lewis  wrote:

> Hi,
>
> I've been trying to Google for an answer to this, but the suggestions I've
> found have been either contradictory or seemingly outdated.
>
> I'm building a Rails frontend for a legacy Oracle database, and I want to
> do proper tests with RSpec/Cucumber. What I can't seem to figure out is how
> to run tests without destroying and rebuilding the database.
>

I would recommend isolating your test data. Ideally put it into something
like Factories (Factory Girl, Machinist,etc) as much as possible. Try to
focus in specifically on exactly what you are testing. I am not the best
example (yet) but my current project has also shown me why it is good to
mock and stub rather than depend on data (I am dealing with legacy data).

As for the db -- couldn't you just backup the oracle db and dump the data
out of it? I am assuming you are using the legacy schema and not the rails
schema way of doing things. Ideally get to an empty db that you can tell
your test suite to recreate each time you run your tests.


I'm well aware that that's the 'best practice' way of doing it... but I'm
> dealing with a massive, >6GB beast with hundreds of tables, byzantine
> constraints, and a rat's nest of spaghetti code in the form of triggers and
> stored procs.
>
> Seriously, I have nightmares about this database as well.
>
> But, I've been slogging away at it, and created a web app that's impressed
> the bosses, and the vendor for that matter. But I also have nightmares about
> the fact that I don't have a test suite. This horrifies me.
>
> What I'd like to do is test against the dev db, since if it gets horribly
> b0rked, I can restore from the previous night's ComVault backup.
>
> I saw the suggestion to edit the rake task in the old rspec_on_rails plugin
> so that
>
> spec_prereq = :noop
>
> I was curious if there was a good way to do this with the current
> rspec-rails gem...
>
> I'm on Ruby 1.9.2 and Rails 3.0.4
>
> Thanks,
>
> Jason Lewis
>
> Email  jasonlewi...@gmail.com
>
> Mobile 414.310.2665
>
> Blog:   http://duckpunching.wordpress.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 from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] A way to stop some fixtures from loading for certain tests?

2011-03-03 Thread Colin Law
On 3 March 2011 18:03, Peter Bell  wrote:
> It seems like best practice is to use a factory gem like factory_girl instead 
> of fixtures. Easily getting different data for different tests is one of the 
> benefits of such an approach.

+1

You don't need to chuck everything out and start again however.  For
the tests that are giving you the problem at the moment start using a
factory (I like machinist rather than factory_girl but it is a matter
of personal preference) instead of the fixtures and as you add new
tests or need to change old ones then do the same.  There is no
problem keeping the fixtures for the existing tests.

Colin

>
> Best Wishes,
> Peter
>
> On Mar 3, 2011, at 6:00 PM, Don.Mc wrote:
>
>> I am using Rails 3. Is there a way to stop a fixture from loading for
>> certain test cases?
>>
>> Regards,
>> Don Mc
>>
>> --
>> 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.
>> For more options, visit this group at 
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
> --
> 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.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Nondestructive testing environment on legacy db

2011-03-03 Thread Jason Lewis
Hi,

I've been trying to Google for an answer to this, but the suggestions I've
found have been either contradictory or seemingly outdated.

I'm building a Rails frontend for a legacy Oracle database, and I want to do
proper tests with RSpec/Cucumber. What I can't seem to figure out is how to
run tests without destroying and rebuilding the database.
I'm well aware that that's the 'best practice' way of doing it... but I'm
dealing with a massive, >6GB beast with hundreds of tables, byzantine
constraints, and a rat's nest of spaghetti code in the form of triggers and
stored procs.

Seriously, I have nightmares about this database as well.

But, I've been slogging away at it, and created a web app that's impressed
the bosses, and the vendor for that matter. But I also have nightmares about
the fact that I don't have a test suite. This horrifies me.

What I'd like to do is test against the dev db, since if it gets horribly
b0rked, I can restore from the previous night's ComVault backup.

I saw the suggestion to edit the rake task in the old rspec_on_rails plugin
so that

spec_prereq = :noop

I was curious if there was a good way to do this with the current
rspec-rails gem...

I'm on Ruby 1.9.2 and Rails 3.0.4

Thanks,

Jason Lewis

Email  jasonlewi...@gmail.com

Mobile 414.310.2665

Blog:   http://duckpunching.wordpress.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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Rails wiki down

2011-03-03 Thread Colin Law
On 3 March 2011 10:53, Xavier Noria  wrote:
> On Thu, Mar 3, 2011 at 11:19 AM, Colin Law  wrote:
>
>> ERROR
>> The requested URL could not be retrieved
>> While trying to retrieve the URL:
>> http://web.archive.org/web/20110303101520/wiki.rubyonrails.org/rails
>> The following error was encountered:
>>    * Socket Failure
>> The system returned:
>>    (98) Address already in use
>> Squid is unable to create a TCP socket, presumably due to excessive
>> load. Please retry your request.
>> Your cache administrator is webmaster.
>> Generated Thu, 03 Mar 2011 10:15:22 GMT by ia310702.us.archive.org
>> (squid/2.6.STABLE14)
>
> http://www.youtube.com/watch?v=DecUcrq6AKo

I don't know how I can ever thank you enough.

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Can't start console

2011-03-03 Thread David Kahn
On Thu, Mar 3, 2011 at 1:55 PM, Glen  wrote:

> rails console is generating an empty application called console rather
> than launching the console.  How do I get into the console.  rails
> server works fine by the way.
>

Are you using Rails 3? Sounds to me like you are trying to start the console
by the Rails 3 way 'rails console' but your Rails v installed is < 3.
Creating a rails app in < Rails 3 you did by 'rails app_name' but in rails 3
you do 'rails new app_name'

If you want to start the console in pre-Rails 3 use 'script/console'


>
> --
> 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.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Can't start console

2011-03-03 Thread Hassan Schroeder
On Thu, Mar 3, 2011 at 11:55 AM, Glen  wrote:
> rails console is generating an empty application called console rather
> than launching the console.  How do I get into the console.  rails
> server works fine by the way.

In the same window? It sure sounds like you're invoking two entirely
different versions of Rails.

You might want to provide a *little* more (as in,  *any*) information
about your environment...

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Can't start console

2011-03-03 Thread Glen
rails console is generating an empty application called console rather
than launching the console.  How do I get into the console.  rails
server works fine by the way.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Gaba Luschi
Sorry, that is, the error is still "Connection refused."

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Gaba Luschi
mmmh, both failed...thoughts?

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: NilClass in my partial

2011-03-03 Thread Rodrigo Alves Vieira
Hello everyone, I just solve this problem. I had in my partial the following 
code:

<%= render :partial => "category" -%>

Then I changed to this:

<%= render :partial => "category", :collection => @categories -%>

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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Rodrigo Alves Vieira
Also, try http://lvh.me:3000

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] NilClass in my partial

2011-03-03 Thread Rodrigo Alves Vieira
Hello everyone, in my Rails 3.0.4 app, I created a partial called 
_category.html.erb that makes part of the category scope of the app like 
categories_controller, category.rb (the model) and so on. But, when I do 
render the partial in app/views/categories/index.html.erb it shows the 
following error: 

NoMethodError in Categories#index

Showing *
/Users/saulolopes/code/parla/app/views/categories/_category.html.erb* where 
line *#1* raised:

undefined method `css' for nil:NilClass

Extracted source (around line *#1*):

1: ">
2:   <%= link_to image_tag(category.picture_file_name), category_path(category) 
%>
3:   "><%= link_to 
category.name, category_path(category) %>
4: 


I am using Inherited Resources in my CategoriesController but I don't think 
it's actually causing any error.

Can anyone help? 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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Frederick Cheung


On 3 Mar 2011, at 18:22, Gaba Luschi  wrote:

> So...how can I get http://localhost:3000 to display?  Or connect to the 
> host, given that it seems like when I type "rails server" i get the 
> standard booting webrick messages...?

Did you check the windows firewall (or any other firewall you may have 
installed)?  Worth tryin 127.0.0.1:3000 as well, I've occasionally had 
localhost resolve to an ipv6 address somehow

Fred
> 
> -- 
> 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 from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Gaba Luschi
So...how can I get http://localhost:3000 to display?  Or connect to the 
host, given that it seems like when I type "rails server" i get the 
standard booting webrick messages...?

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Re: Re: Rails 3 Routing: Namespace'd Controllers?

2011-03-03 Thread Jesse S.
Stefan Buhr wrote in post #897683:
> Conrad Taylor wrote:
>> Sent from my iPhone
>>
>>
>> Please post the Rails 2.x route that you would like to convert to
>> Rails 3.0?
>>
>
> Hey Conrad,
>
> I think I made a mistake.
>
> I was under the impression that following code in rails 2
> map.namespace :admin do |admin|
>   admin.connect ':controller/:action/:id'
> end
> was enabling /admin/any_controller/any_action =>
> Addmin::AnyController#any_action
> but it did not.
>
> instead, the default root was still enabled. The above code never
> worked.
>
> Ultimatly, what I am trying to do, is to use the default root but ONLY
> for controllers in a specific namespace (other parts of the application
> are using resources)

What your looking for is scope in routes: 
http://guides.rubyonrails.org/routing.html#controller-namespaces-and-routing

scope "/admin" do
  match ":controller(/:action(/:id))"
  resources :posts # :controller => PostsController
end

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Hassan Schroeder
On Thu, Mar 3, 2011 at 9:52 AM, Walter Lee Davis  wrote:
>
> On other platforms, I can't say for sure about either of these.

[2011-03-03 12:20:42] INFO ruby 1.8.7 (2011-02-18) [i386-mingw32]

Doesn't the last part of that line indicate Windows?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Mongrel starting Error

2011-03-03 Thread Frederick Cheung


On 3 Mar 2011, at 09:16, DHAMODHARAN N  wrote:

> 
> Hello friends!
> 
> When i tried to start my server arising this error, currently i using rails 
> 2.3.2. If any one know what is reason suggestion me.
>  
>  $ mongrel_rails start
> !!! Path to log file not valid: log/mongrel.log
> mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get 
> help
> 

Does the log folder exist?

Fred


> 
> 
> Thanks & Regards,
> Dhamodharan.N
> -- 
> 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.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Gaba Luschi
I have windows.  When I type in "edit /etc/hosts", I get
MS-DOS Editor
Version 2.0.026
Copyright (c) Microsoft Corp 1995

Is there something in particular I should look for here?  I get
/B - Forces monochrome mode
/H - Displays the maximum number of lines possible for your hardware
.
.
.

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: date type in database becomes nil in rails

2011-03-03 Thread Ichiro Saga
> I think you will have to give us a lot more information.  Post the
> section from db/schema.rb for the offending table, post the model.rb
> (remove any irrelevant methods you have included, but if you have
> included a method with a name like the column that does not work then
> include that) and post the result of entering, in the console,
> model.first or something similar which should fetch a valid record.
>
> Colin

Thanks for your reply, Colin.  I found the workaround that's to change 
the type from date to datetime.  It's so strange that even if I created 
a new app in Ubuntu with date type in the model, same problem occurred.

Ichiro

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: uninitialized constant ActiveSupport::Dependencies::Mutex

2011-03-03 Thread Kevin Owocki
For anyone else who had this problem, this is how I solved it:

Make sure 'activesupport' is listed when you do 'gem list' and make sure
it's the same version as 'rails'. All the versions must match (and must
match the RAILS_VERSION in config/environment.rb).

If you need to install a specific version, do

'gem install activesupport -v 2.3.8'

(change 2.3.8 to required version)



 Kevin Owocki 

co-founder & lead developer at ignighter 

_

find me on twitter ,
facebook,
linkedin , and
owocki.com.


see you around teh internets!
 On Thu, Mar 3, 2011 at 8:43 AM, Frederick Cheung <
frederick.che...@gmail.com> wrote:

>
>
> On Mar 3, 12:01 am, Kevin Owocki  wrote:
> > Hi all,
> >
> > I'm new to the world of ruby, and am trying to get my first rake set up.
> >  But my rake is failing with the following error message: "uninitialized
> > constant ActiveSupport::Dependencies::Mutex"
> >
>
> Does sticking
>
> require 'thread'
>
> somewhere like right at the top of environment.rb help at all?
>
> Fred
> > *# rake db::setup --trace*
> > (in /var/www/bi)
> > rake aborted!
> > uninitialized constant ActiveSupport::Dependencies::Mutex
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in
> > `const_missing'
> >
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/de
> pendencies.rb:55
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> > `gem_original_require'
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> >
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support.rb
> :56
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> > `gem_original_require'
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:18
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4:in
> `load'
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4:in
> `each'
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> > `gem_original_require'
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> > /var/www/bi/Rakefile:10
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
> > `raw_load_rakefile'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
> > `load_rakefile'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> > `standard_exception_handling'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
> > `load_rakefile'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> > `standard_exception_handling'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
> > /usr/local/bin/rake:19:in `load'
> > /usr/local/bin/rake:19
> >
> > I've tried googling around, but so far, no luck figuring out what's up.
>  Am
> > I missing a dependency of some sort that I am unaware of?
> >
> > Here is my diagnostic info:
> >
> > CentOS release 5.5 (Final)
> > []# ruby -v
> > ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
> > []# rails -v
> > Rails 3.0.5
> > []# passenger -v
> > Phusion Passenger version 3.0.4
> > []# gem -v
> > 1.6.0
> >
> >  Kevin Owocki 
> >
> > co-founder & lead developer at ignighter 
> >
> > _
> >
> > find me on twitter ,
> > facebook,
> > linkedin , and
> > owocki.com.
> >
> > see you around teh internets!
>
> --
> 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.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl

Re: [Rails] A way to stop some fixtures from loading for certain tests?

2011-03-03 Thread Peter Bell
It seems like best practice is to use a factory gem like factory_girl instead 
of fixtures. Easily getting different data for different tests is one of the 
benefits of such an approach.

Best Wishes,
Peter

On Mar 3, 2011, at 6:00 PM, Don.Mc wrote:

> I am using Rails 3. Is there a way to stop a fixture from loading for
> certain test cases?
> 
> Regards,
> Don Mc
> 
> -- 
> 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.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] A way to stop some fixtures from loading for certain tests?

2011-03-03 Thread Don.Mc
I am using Rails 3. Is there a way to stop a fixture from loading for
certain test cases?

Regards,
Don Mc

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Walter Lee Davis


On Mar 3, 2011, at 12:22 PM, Gaba Luschi wrote:

How do i check to see what my etc/hosts file look like?  It's in a  
demo

app, in views, with a basic index.html.  How do I check re: firewall?
Thanks!


If you're using a Mac, and TextMate, type mate /etc/hosts in your  
Terminal. If you don't have TextMate, you can use your favorite  
command-line editor through the generic (alias) command edit, as in  
edit /etc/hosts. Or nano /etc/hosts for that very easy-to-use editor.


Again, on the Mac, the firewall is configured in the System  
Preferences app, in the Security section.


On other platforms, I can't say for sure about either of these. On  
anything Unix-like, edit /etc/hosts should get you **something**.


Walter



--
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- 
t...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en 
.




--
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] application/json request defaults?

2011-03-03 Thread pipplo
I ran into a strange problem when moving a locally working app to a
hosted server.

We have a phone app sending json requests via POST to the rails app.
When doing this on the local system everything comes through as
application/json

When I moved it to the host I was having Authenticity Token errors.  I
realized that our phone app was not setting the correct content-type
to application/json

I'm confused as to why this works on my local system?  Is there some
setting that allows it to default / override all json requests to
application/json type?

Another thing I noticed is that on the remote system all AJAX calls
have an authenticitytoken included in the request params (but there is
no field in the FORM for that)

On the local system this token doesn't get included in AJAX calls.

I think there must be some setting/configuration but I haven't been
able to find anything.

Anyone have ideas?

Also, this is on RAILS 2.3.4

Joe

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Update and Redevelopment

2011-03-03 Thread Peter Bell
On Mar 3, 2011, at 3:54 PM, Doug Clark wrote:

> What I'm getting at is I believe our system needs an overhaul - a
> complete rewrite from top to bottom - and I'd like to do it with the
> most recent version of Rails.

I get the feeling - I really do. But just before you start, go get a copy of 
Mike Feathers excellent book on Working effectively with legacy code. I'd 
*strongly* recommend using some of his patterns to slowly port to the new 
version of the app. They aren't trivial to implement, they add additional 
complexity during the transition period, but compared to the death march that 
most ground up rewrites end up as, I can't suggest too strongly to think twice 
about a big bang, ground up rewrite.

http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052

Just my 2c. Hopefully someone else will chime in about porting the schema and 
model code.

Best Wishes,
Peter

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Gaba Luschi
How do i check to see what my etc/hosts file look like?  It's in a demo 
app, in views, with a basic index.html.  How do I check re: firewall? 
Thanks!

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Update and Redevelopment

2011-03-03 Thread Doug Clark
Hey all, first post here, looking for some answers that I couldn't
find otherwise on the web.

Several years ago, my company hired a developer to develop a database
system for our company.  It handles all customer records, and is used
by 6-10 users on a daily basis.  It was written with Rails 2.0.2 (I
know, archaic).  The developer used a ton of non-traditional
approaches to the code, so attempts to upgrade to a newer version have
caused half the system to not work, resulting in more time reverting
code and SVN back to its original state.

After numerous updates, enhancements, addons, etc., it now crawls
along slowly, and the interface isn't very efficient.  I know a lot of
the problem is JavaScript, as it has 4 libraries in place to do
everything the system needs to do (most of which is unnecessary eye
candy - while I want things to look good, every form element does not
need to be skinned).  However, a lot is poorly written code (some was
the original developer not knowing MVC that well, some was my early
"I'm still learning the language" code that probably takes 10x the
lines).

What I'm getting at is I believe our system needs an overhaul - a
complete rewrite from top to bottom - and I'd like to do it with the
most recent version of Rails.  The biggest issue I have with this is
that it currently uses over 100 tables to handle all the data, not all
of which is very efficient.  I don't want to rewrite the entire back
end database schema, because the majority of it is well factored, and
some of the code in some of the helpers and models is very good.
However, I believe this deserves starting over with a whole new, mess-
free RoR project.

I know I can copy and paste code over without a problem.  But what I
need to know is this: Is there an easy way to migrate the database and
model code over without having to rewrite all of it?

Thank you in advance for your help.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Problem connecting to localhost:3000

2011-03-03 Thread Walter Lee Davis


On Mar 3, 2011, at 12:06 PM, Gaba Luschi wrote:


Hi,
After typing "rails server",


Please paste in what you see in Terminal after you typed this. You  
might also see some sort of traffic log from the first try (the one  
that was refused). Also, what does your /etc/hosts file look like? Do  
you have the Firewall up? (not sure that matters on localhost, but  
worth a try)


Walter


I tried to go to http://localhost:3000, as
well as http://0.0.0.0:3000, but I got an error message.  In the first
case, I get: Connection refused.  For the second one, there was an  
error

about no DNS entry?
Help!

--
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- 
t...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en 
.




--
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problem connecting to localhost:3000

2011-03-03 Thread Gaba Luschi
Walter,
This is what I get when I type in "rails server"

=> Booting WEBrick
=> Rails 3.0.4 application starting in development on 
http://0.0.0.0:3000
=> call with -d to detach
=> Ctrl-C to shutdown server

[2011-03-03 12:20:42] INFO WEBrick 1.3.1
[2011-03-03 12:20:42] INFO ruby 1.8.7 (2011-02-18) [i386-mingw32]
[2011-03-03 12:20:42] INFO WEBrick::HTTPServer#start: pid = 1604 port 
=3000

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Problem connecting to localhost:3000

2011-03-03 Thread Gaba Luschi
Hi,
After typing "rails server", I tried to go to http://localhost:3000, as
well as http://0.0.0.0:3000, but I got an error message.  In the first
case, I get: Connection refused.  For the second one, there was an error
about no DNS entry?
Help!

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Video Streaming

2011-03-03 Thread kwiest
I've used TokBox before.  They have a full API to place calls, or you
can just use one of their cut-and-paste boxes to support video and
chat.

I also use Media Temple to host.  Has been great for me so far.

On Mar 2, 2:19 pm, Jags84  wrote:
> Hi guys!
>
> I like to develop an application for Video/Chat in RoR, i am searching
> and i find that i need a Streaming server, i find 2
>
> Flash Media Server
> Red5
>
> i like to know is there another way of doing this? or if anyone has
> tried the Red5 in Ror? i like to do something likewww.twitcam.com
>
> Another thing, where i can host that application? godaddy? another
> one?
>
> 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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: One controller for two tables?

2011-03-03 Thread Vero
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: group() and PostgreSQL strange behavior

2011-03-03 Thread Fernando Perez
> I tried, and received the same result:
>
> User.group(:first_name)

The thing is, we group for a reason. So PostgreSQL is expecting that 
reason to appear, e.g: count(), sum(), etc.

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Rails 2.3.7 and content_for problem

2011-03-03 Thread eric
I want to offer control over my app's navigation using multiple
yields, which worked fine on my home rails 3 installation, but at
work, I'm stuck with an app that uses 2.7, and the same approach isn't
working.

Basically, I have 3 yields: <% yield :navigation%> <% yield :sidebar
%> and regular ol' yield.

The regular one works fine, of course. However, the other two result
in certain tags being escaped: , , , etc. The result is
that the tags appear as text in the display, and aren't interpreted by
the browser. I've tried the few suggestions I've found on the internet
(prefix the content_for with raw, etc), however, nothing has changed
the outcome. I should say that link_to in the content_for block is
properly handled and is not escaped, which is pretty interesting to
me.

I've reproduced the problem to a newly generated app with 1 scaffold
based class, with only minor alterations (adding the application.erb
and modifications to the index.html.erb file. Note that the navigation
content_for shows the list markup as text, but obeys the output of
link_to as markup.

application.erb:



  
 

  <%= raw yield :navigation %>


   <%= yield %>

 
  



index.html.erb:
<% content_for :navigation do %>
  <%= link_to 'New page', new_page_path %>
<% end %>

Listing pages


  
Title
Body
  

<% @pages.each do |page| %>
  
<%=h page.title %>
<%=h page.body %>
<%= link_to 'Show', page %>
<%= link_to 'Edit', edit_page_path(page) %>
<%= link_to 'Destroy', page, :confirm => 'Are you
sure?', :method => :delete %>
  
<% end %>




-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Ruby on Rails integration with Red5 Chat

2011-03-03 Thread Fernando Perez
I used to have a videochat app on my website. People would register from 
within the Rails app, then the Red5 server would simply access the 
database to check for credentials.

The rails part was fun, the Red5/java part... less fun.


--
http://digiprof.tv

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Installation Error?

2011-03-03 Thread Gaba Luschi
When I do gem env, I get

RubyGems Environment:
-RUBYGEMS VERSION: 1.5.2
- RUBY VERSION: 1.9.2 <2011-02-18 patchlevel 180>> [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby192/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/Ruby192/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby192/bin
- RUBYGEMS PLATFORMS:
 - ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby192/lib/ruby/gems/1.9.1
- H:/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: A rails plugin to generate css sprite image automatically

2011-03-03 Thread Raul Souza Lima
One more option https://github.com/hagenburger/lemonade ;)

On 3 March 2011 11:55, Sam Woodard  wrote:

> flyerhzm wrote in post #855601:
> > Hi guys,
> >
> > I have written a rails plugin/gem to generate css sprite image
> > automatically.
>
> This is awesome!  I'm really glad you are creating tools like this.
> Just wanted to through out there that there is another gem that is
> similar, active_assets, but it also creates the stylesheets!
>
> Check it out at Github: http://bitly.com/eRTwU4
>
> The latest releases only work with Rails 3, but if you need 2.3 support
> use 0.3.x.
>
> Cheers,
> Sam
>
> --
> 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 from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
from Brazil, Raul Souza Lima 
Vegetarian, geek, born in São Paulo - Brazil.
http://webxperience.com.br/
http://raulsouzalima.com/blog
http://www.linkedin.com/in/raulsouzalima

Please don't print this e-mail
Evite imprimir este e-mail

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: A rails plugin to generate css sprite image automatically

2011-03-03 Thread Sam Woodard
flyerhzm wrote in post #855601:
> Hi guys,
>
> I have written a rails plugin/gem to generate css sprite image
> automatically.

This is awesome!  I'm really glad you are creating tools like this. 
Just wanted to through out there that there is another gem that is 
similar, active_assets, but it also creates the stylesheets!

Check it out at Github: http://bitly.com/eRTwU4

The latest releases only work with Rails 3, but if you need 2.3 support 
use 0.3.x.

Cheers,
Sam

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problems with Sqlite3 and apt-get

2011-03-03 Thread Frederick Cheung


On Mar 3, 1:44 pm, Scott L Gu  wrote:
> Thanks, Frederick, it works. I can go one step further now.
>
> However, I still have a problem with "rails console":      `require':
> no such file to load -- readline (LoadError)
>
> I saw some solution to do :    yum install ncurses-devel readline-
> devel
>
> I did it. However, the next steps should be :
>
> cd /ext/readline
> ruby extconf.rb
> make && make install
>
> But I cannot find ext/readline in my ruby directory: /home/ec2-
> user/.rvm/rubies/ruby-1.9.2-p180/
> and don't know where this extconf.rb should be :-)
>

it will be where the source code for ruby is. Seeing as you are using
rvm, the easiest thing is probably to ask rvm to reinstall ruby for
you - it should build the readline extension automatically now that
the readline development package is installed.

Fred

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: uninitialized constant ActiveSupport::Dependencies::Mutex

2011-03-03 Thread Kevin Owocki
Hi Fred,

It does not help in my case.



 Kevin Owocki 

co-founder & lead developer at ignighter 

_

find me on twitter ,
facebook,
linkedin , and
owocki.com.


see you around teh internets!
 On Thu, Mar 3, 2011 at 8:43 AM, Frederick Cheung <
frederick.che...@gmail.com> wrote:

>
>
> On Mar 3, 12:01 am, Kevin Owocki  wrote:
> > Hi all,
> >
> > I'm new to the world of ruby, and am trying to get my first rake set up.
> >  But my rake is failing with the following error message: "uninitialized
> > constant ActiveSupport::Dependencies::Mutex"
> >
>
> Does sticking
>
> require 'thread'
>
> somewhere like right at the top of environment.rb help at all?
>
> Fred
> > *# rake db::setup --trace*
> > (in /var/www/bi)
> > rake aborted!
> > uninitialized constant ActiveSupport::Dependencies::Mutex
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in
> > `const_missing'
> >
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/de
> pendencies.rb:55
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> > `gem_original_require'
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> >
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support.rb
> :56
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> > `gem_original_require'
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:18
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4:in
> `load'
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4:in
> `each'
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> > `gem_original_require'
> > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `require'
> > /var/www/bi/Rakefile:10
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
> > `raw_load_rakefile'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
> > `load_rakefile'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> > `standard_exception_handling'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
> > `load_rakefile'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> > `standard_exception_handling'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
> > /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
> > /usr/local/bin/rake:19:in `load'
> > /usr/local/bin/rake:19
> >
> > I've tried googling around, but so far, no luck figuring out what's up.
>  Am
> > I missing a dependency of some sort that I am unaware of?
> >
> > Here is my diagnostic info:
> >
> > CentOS release 5.5 (Final)
> > []# ruby -v
> > ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
> > []# rails -v
> > Rails 3.0.5
> > []# passenger -v
> > Phusion Passenger version 3.0.4
> > []# gem -v
> > 1.6.0
> >
> >  Kevin Owocki 
> >
> > co-founder & lead developer at ignighter 
> >
> > _
> >
> > find me on twitter ,
> > facebook,
> > linkedin , and
> > owocki.com.
> >
> > see you around teh internets!
>
> --
> 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.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Same file in different apps

2011-03-03 Thread Hemant Bhargava
Well say if i need app/models/abc.rb of an existing application ABC into 
new application DEF, then what all i need to do? There are so many files 
i need to be shared but did'nt have any fair idea how to get it.

So rubians :), please help me on it.

-- 
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 from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problems with Sqlite3 and apt-get

2011-03-03 Thread Scott L Gu
Thanks, Frederick, it works. I can go one step further now.

However, I still have a problem with "rails console":  `require':
no such file to load -- readline (LoadError)

I saw some solution to do :yum install ncurses-devel readline-
devel

I did it. However, the next steps should be :

cd /ext/readline
ruby extconf.rb
make && make install

But I cannot find ext/readline in my ruby directory: /home/ec2-
user/.rvm/rubies/ruby-1.9.2-p180/
and don't know where this extconf.rb should be :-)

Scott



On Mar 3, 3:51 am, Frederick Cheung 
wrote:
> On Mar 3, 10:38 am, Scott L Gu  wrote:> I am new to Ruby, 
> and have a problem to install Sqlite3.
>
> > After searching the previous posts, I found a solution, first to do :
> >   sudo apt-get install libsqlite3-0 libsqlite3-dev
>
> > However, I am on an AWS Ec2 instance which don't have apt-get, only
> > with yum. Would anyone please
> > tell me how to install apt-get, or how to use yum to install
> > libsqlite3-dev ? Really appreciate !
>
> The naming is slightly different - looks like sqlite-devel is the yum
> package you want.
>
> Fred
>
>
>
> > Scott- Hide quoted text -
>
> - Show quoted text -

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: uninitialized constant ActiveSupport::Dependencies::Mutex

2011-03-03 Thread Frederick Cheung


On Mar 3, 12:01 am, Kevin Owocki  wrote:
> Hi all,
>
> I'm new to the world of ruby, and am trying to get my first rake set up.
>  But my rake is failing with the following error message: "uninitialized
> constant ActiveSupport::Dependencies::Mutex"
>

Does sticking

require 'thread'

somewhere like right at the top of environment.rb help at all?

Fred
> *# rake db::setup --trace*
> (in /var/www/bi)
> rake aborted!
> uninitialized constant ActiveSupport::Dependencies::Mutex
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in
> `const_missing'
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/de 
> pendencies.rb:55
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support.rb 
> :56
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:18
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4:in `load'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4:in `each'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
> /var/www/bi/Rakefile:10
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
> `raw_load_rakefile'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
> `load_rakefile'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> `standard_exception_handling'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
> `load_rakefile'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> `standard_exception_handling'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
> /usr/local/bin/rake:19:in `load'
> /usr/local/bin/rake:19
>
> I've tried googling around, but so far, no luck figuring out what's up.  Am
> I missing a dependency of some sort that I am unaware of?
>
> Here is my diagnostic info:
>
> CentOS release 5.5 (Final)
> []# ruby -v
> ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
> []# rails -v
> Rails 3.0.5
> []# passenger -v
> Phusion Passenger version 3.0.4
> []# gem -v
> 1.6.0
>
>  Kevin Owocki 
>
> co-founder & lead developer at ignighter 
>
> _
>
> find me on twitter ,
> facebook,
> linkedin , and
> owocki.com.
>
> see you around teh internets!

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: uninitialized constant ActiveSupport::Dependencies::Mutex

2011-03-03 Thread m__
I'm having the same error message over here when installing Redmine,
although a quite different setup (see below). Does anybody have a
solution to this problem?

C:\Redmine>rake db:migrate --trace
(in C:/Redmine)
rake aborted!
uninitialized constant ActiveSupport::Dependencies::Mutex
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in
`const_missing'

C:/Redmine/vendor/rails/activesupport/lib/active_support/
dependencies.rb:55
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
C:/Redmine/vendor/rails/activesupport/lib/active_support.rb:56
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
C:/Redmine/vendor/rails/railties/lib/tasks/misc.rake:18
C:/Redmine/vendor/rails/railties/lib/tasks/rails.rb:4:in `load'
C:/Redmine/vendor/rails/railties/lib/tasks/rails.rb:4
C:/Redmine/vendor/rails/railties/lib/tasks/rails.rb:4:in `each'
C:/Redmine/vendor/rails/railties/lib/tasks/rails.rb:4
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
C:/Redmine/Rakefile:10
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
`load'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
`raw_load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
`load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
`load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Ruby187/bin/rake:19:in `load'
C:/Ruby187/bin/rake:19

C:\Redmine>gem list

*** LOCAL GEMS ***

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
gem_plugin (0.2.3)
i18n (0.4.2)
rack (1.1.1)
rails (2.3.11)
rake (0.8.7)

On Mar 3, 1:01 am, Kevin Owocki  wrote:
> Hi all,
>
> I'm new to the world of ruby, and am trying to get my first rake set up.
>  But my rake is failing with the following error message: "uninitialized
> constant ActiveSupport::Dependencies::Mutex"
>
> *# rake db::setup --trace*
> (in /var/www/bi)
> rake aborted!
> uninitialized constant ActiveSupport::Dependencies::Mutex
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2503:in
> `const_missing'
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/de 
> pendencies.rb:55
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support.rb 
> :56
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:18
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4:in `load'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4:in `each'
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:4
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
> /var/www/bi/Rakefile:10
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
> `raw_load_rakefile'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
> `load_rakefile'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> `standard_exception_handling'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
> `load_rakefile'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
> `standard_exception_handling'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
> /usr/local/bin/rake:19:in `load'
> /usr/local/bin/rake:19
>
> I've tried googling around, but so far, no luck figuring out what's up.  Am
> I missing a dependency of some sort that I am unaware of?
>
> Here is my diagnostic info:
>
> CentOS release 5.5 (Final)
> []# ruby -v
> ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
> []# rails -v
> Rails 3.0.5
> []# passenger -v
> Phusion Pass

Re: [Rails] Re: Show a value in view

2011-03-03 Thread Colin Law
On 3 March 2011 10:47, Chandu80  wrote:
> Hi,

By the way could you not top post please, it makes it difficult to
follow the thread.  Insert your reply at appropriate point(s) in
previous message.  Thanks

> I also tried @<%=h @posted_by_name.inspect %>:  and it gave
>
> @nil:

In that case, obviously, @posted_by_name is nil.  What did you see
when you used ruby-debug to break into the controller code?

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: One controller for two tables?

2011-03-03 Thread Michael Pavling
On 3 March 2011 13:12, Vero  wrote:
> Hi. It's again me.
> I found article that helped me to solved this exercise:
> http://www.ruby-forum.com/topic/202398#new


If you're looking to make your controllers DRYer, then you might
benefit from one of the abstraction methods like "Inherited Resources"
(https://github.com/josevalim/inherited_resources).

It (and other similar methods) is a bit more flexible than just having
the RESTful actions mapped by a common base class.

HTH

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: One controller for two tables?

2011-03-03 Thread Vero
Hi. It's again me.
I found article that helped me to solved this exercise:
http://www.ruby-forum.com/topic/202398#new
 
https://gist.github.com/280670
Sorry that I disturbed you.
Bye.)

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Problems with Sqlite3 and apt-get

2011-03-03 Thread Frederick Cheung


On Mar 3, 10:38 am, Scott L Gu  wrote:
> I am new to Ruby, and have a problem to install Sqlite3.
>
> After searching the previous posts, I found a solution, first to do :
>   sudo apt-get install libsqlite3-0 libsqlite3-dev
>
> However, I am on an AWS Ec2 instance which don't have apt-get, only
> with yum. Would anyone please
> tell me how to install apt-get, or how to use yum to install
> libsqlite3-dev ? Really appreciate !
>
The naming is slightly different - looks like sqlite-devel is the yum
package you want.

Fred
> Scott

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: CrowdCoded.com

2011-03-03 Thread innosys
Dear Michael
Thank you for your response. In regards to your comments:
1) By all means ,this is not spam. CrowdCoded is a service aimed at
all development cycle professionals. It allows code freelancers to
find/join/submit projects for free. Hence –we thought it would be of
good service to the Rails community (which has some freelancers among
its members).
2) We always strive to improve the service and look forward to
constructive feedback. Try the site ,and then feel free to comment on:
feedback at crowdcoded dot com

Thanks again ,and have a great day.
CrowdCodedTeam


On Mar 1, 3:21 pm, Michael Pavling  wrote:
> On 1 March 2011 11:40, innosys  wrote:
>
> > I’d like to recommend a new tool for Software/Hardware & IT
> > professionals.
> >http://www.crowdcoded.com
>
> You might want to crowd-code for a proof-reader...
>
> Also, funnily for a company promoting their "Real-Time Mobile
> Multiplayer Gaming", you use an OTS collaboration product like Oxwall
> and have it render dreadfully on Android.
>
> BTW What relevance has this to Rails? Or are you just spamming Google groups?
>
> Googles
>
> yup... looking at the amount of times this message is already indexed,
> you're just spamming :-/

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Problems with Sqlite3 and apt-get

2011-03-03 Thread Scott L Gu

I am new to Ruby, and have a problem to install Sqlite3.

After searching the previous posts, I found a solution, first to do :
  sudo apt-get install libsqlite3-0 libsqlite3-dev

However, I am on an AWS Ec2 instance which don't have apt-get, only
with yum. Would anyone please
tell me how to install apt-get, or how to use yum to install
libsqlite3-dev ? Really appreciate !

Scott

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] One controller for two tables?

2011-03-03 Thread Vero
Hi everyone!

I have one controller in app/comtrollers/AdminsController.rb

class AdminsController < ApplicationController

#with standart CRUD methods
 def index
@admins = Admin.find(:all)
end

There are another one, that inherit his methods from parent:

class TurnirresultsController < AdminsController

 def index
@admins = Turnir.find(:all)
super

 end

Both have the same CRUD methods. It's look very ugly. That's why I
inherited TurnirresultsController class from  AdminsController.

view for "new" method  looks like:


<% form_for(@admin) do |f| %>
 <%= f.error_messages %>

<%= f.label :title %>ut
  <%= f.text_area :title, :rows => 1, :cols => 103  %>
  


Usually, thay are using different tables.
 I need to explore different views.

Here the problem:In this case the new Turnir object doesn't create.
That's why it doesn't work.

I read cook book, looked in the net, but all finded articles didn't
help me.
I tried whith routes.rb:

map.resources :turnirresults

but... you see, i'm here.
Please, Help me to find solution of this problem.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Show a value in view

2011-03-03 Thread Chandu80
Hi,
I also tried @<%=h @posted_by_name.inspect %>:  and it gave

@nil:

Some null value being returned from URL.
Thanks for the help.

Regards
Chandrika


On Mar 3, 1:36 pm, Colin Law  wrote:
> On 3 March 2011 07:43, Chandu80  wrote:
>
> > Hello All,
> > I am working on a microblogging application.(similar to twitter)
> > In my controller there is a method called replypopUp.It is a method
> > that runs when the reply link on timeline is clicked.When I a click on
> > the link a pop-up appears in which there is a text area and a post
> > button.Inside the text area,the name of the user to whom I am replying
> > should appear in the form '@username:'
> > Now in my controller method I am taking that user's name using
> >    @posted_by_name = params[:posted_by]
>
> Use ruby-debug (see the Rails Guide on debugging if you do not know
> how to do this) to break in here and examine @posted_by_name
>
> > In my view my text area looks like this
>
> >  > style="overflow:auto;width:100%;height:
> > 56px ;"onkeyup="checkPostFieldLength(message,'remaining',
> > 400);"onkeydown="checkPostFieldLength(message,'remaining',
> > 400);"onmouseout="checkPostFieldLength(message,'remaining', 400);">@<
> > %=h @posted_by_name %>:
>
> What happens if you just have, just to check it is not an issue with
> the text area
> @<%= h posted_by_name %>:
>
>
>
> > The text within <% %> is the username I am trying to paste by default
> > inside the text area
> > However when I run the application,I only get" @:" in the text
> > area.The name of the user does not appear.
> > I have also tried to check using http watch,and I see the url being
> > passed correctly,so there is no chance of params[:posted_by] being
> > taken as a null value.
>
> You can check the params by looking in log/development.log.
>
> Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Rails wiki down

2011-03-03 Thread Xavier Noria
On Thu, Mar 3, 2011 at 11:19 AM, Colin Law  wrote:

> ERROR
> The requested URL could not be retrieved
> While trying to retrieve the URL:
> http://web.archive.org/web/20110303101520/wiki.rubyonrails.org/rails
> The following error was encountered:
>    * Socket Failure
> The system returned:
>    (98) Address already in use
> Squid is unable to create a TCP socket, presumably due to excessive
> load. Please retry your request.
> Your cache administrator is webmaster.
> Generated Thu, 03 Mar 2011 10:15:22 GMT by ia310702.us.archive.org
> (squid/2.6.STABLE14)

http://www.youtube.com/watch?v=DecUcrq6AKo

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Show a value in view

2011-03-03 Thread Colin Law
On 3 March 2011 10:39, Chandu80  wrote:
> Hi,
> I tried executing the below statement and it just gave me "@:"
>
>> What happens if you just have, just to check it is not an issue with
>> the text area
>> @<%= h posted_by_name %>:

I meant @posted_by_name of course.  Sorry.

By the way could you not top post please, it makes it difficult to
follow the thread.  Insert your reply at appropriate point(s) in
previous message.  Thanks

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Show a value in view

2011-03-03 Thread Chandu80
Hi,
I tried executing the below statement and it just gave me "@:"

> What happens if you just have, just to check it is not an issue with
> the text area
> @<%= h posted_by_name %>:
>

Regards
Chandrika

On Mar 3, 1:36 pm, Colin Law  wrote:
> On 3 March 2011 07:43, Chandu80  wrote:
>
> > Hello All,
> > I am working on a microblogging application.(similar to twitter)
> > In my controller there is a method called replypopUp.It is a method
> > that runs when the reply link on timeline is clicked.When I a click on
> > the link a pop-up appears in which there is a text area and a post
> > button.Inside the text area,the name of the user to whom I am replying
> > should appear in the form '@username:'
> > Now in my controller method I am taking that user's name using
> >    @posted_by_name = params[:posted_by]
>
> Use ruby-debug (see the Rails Guide on debugging if you do not know
> how to do this) to break in here and examine @posted_by_name
>
> > In my view my text area looks like this
>
> >  > style="overflow:auto;width:100%;height:
> > 56px ;"onkeyup="checkPostFieldLength(message,'remaining',
> > 400);"onkeydown="checkPostFieldLength(message,'remaining',
> > 400);"onmouseout="checkPostFieldLength(message,'remaining', 400);">@<
> > %=h @posted_by_name %>:
>
> What happens if you just have, just to check it is not an issue with
> the text area
> @<%= h posted_by_name %>:
>
>
>
> > The text within <% %> is the username I am trying to paste by default
> > inside the text area
> > However when I run the application,I only get" @:" in the text
> > area.The name of the user does not appear.
> > I have also tried to check using http watch,and I see the url being
> > passed correctly,so there is no chance of params[:posted_by] being
> > taken as a null value.
>
> You can check the params by looking in log/development.log.
>
> Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Rails wiki down

2011-03-03 Thread Colin Law
On 3 March 2011 09:34, Xavier Noria  wrote:
> On Thu, Mar 3, 2011 at 9:41 AM, Colin Law  wrote:
>
>>> Rails has now two official sets of documentation, the API and the guides.
>>
>> So where do I find the most useful list of reserved words that used to
>> be at http://wiki.rubyonrails.org/rails/pages/ReservedWords ?
>
> As a last resort you can consult the wayback machine:
>
>    http://web.archive.org/web/wiki.rubyonrails.org/rails

ERROR
The requested URL could not be retrieved
While trying to retrieve the URL:
http://web.archive.org/web/20110303101520/wiki.rubyonrails.org/rails
The following error was encountered:
* Socket Failure
The system returned:
(98) Address already in use
Squid is unable to create a TCP socket, presumably due to excessive
load. Please retry your request.
Your cache administrator is webmaster.
Generated Thu, 03 Mar 2011 10:15:22 GMT by ia310702.us.archive.org
(squid/2.6.STABLE14)

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Rails wiki down

2011-03-03 Thread Xavier Noria
On Thu, Mar 3, 2011 at 9:41 AM, Colin Law  wrote:

>> Rails has now two official sets of documentation, the API and the guides.
>
> So where do I find the most useful list of reserved words that used to
> be at http://wiki.rubyonrails.org/rails/pages/ReservedWords ?

As a last resort you can consult the wayback machine:

http://web.archive.org/web/wiki.rubyonrails.org/rails

Please note that the wiki has been down *for weeks*, and mostly nobody
noticed. That's a signal. It was something that played its role in the
early days, and now we have to move on.

Of course, if there's missing documentation in the project that should be fixed.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Mongrel starting Error

2011-03-03 Thread DHAMODHARAN N
Hello friends!

When i tried to start my server arising this error, currently i using rails
2.3.2. If any one know what is reason suggestion me.

 $ mongrel_rails start
!!! Path to log file not valid: log/mongrel.log
mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get
help



Thanks & Regards,
Dhamodharan.N

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Rails wiki down

2011-03-03 Thread Michael Pavling
On 3 March 2011 08:41, Colin Law  wrote:
> On 3 March 2011 07:55, Xavier Noria  wrote:
>> There are no plans to bring it up again by now. The wiki had some
>> outdated information and was not maintained generally speaking.
>
> So where do I find the most useful list of reserved words that used to
> be at http://wiki.rubyonrails.org/rails/pages/ReservedWords ?

"I've emptied the bath now, where's the baby?!"

:-/

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Rails wiki down

2011-03-03 Thread Colin Law
On 3 March 2011 07:55, Xavier Noria  wrote:
> On Thu, Mar 3, 2011 at 8:29 AM, Maxo  wrote:
>
>> Any idea when it will be up?
>>
>> I found lots of interesting materials on wiki, so it is indeed very
>> helpful
>
> There are no plans to bring it up again by now. The wiki had some
> outdated information and was not maintained generally speaking. The
> link to the wiki has been removed also from the sidebar of the
> generated public/index.html etc.
>
> Rails has now two official sets of documentation, the API and the guides.

So where do I find the most useful list of reserved words that used to
be at http://wiki.rubyonrails.org/rails/pages/ReservedWords ?

Colin

>
> --
> 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.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Show a value in view

2011-03-03 Thread Colin Law
On 3 March 2011 07:43, Chandu80  wrote:
> Hello All,
> I am working on a microblogging application.(similar to twitter)
> In my controller there is a method called replypopUp.It is a method
> that runs when the reply link on timeline is clicked.When I a click on
> the link a pop-up appears in which there is a text area and a post
> button.Inside the text area,the name of the user to whom I am replying
> should appear in the form '@username:'
> Now in my controller method I am taking that user's name using
>    @posted_by_name = params[:posted_by]

Use ruby-debug (see the Rails Guide on debugging if you do not know
how to do this) to break in here and examine @posted_by_name

> In my view my text area looks like this
>
>  style="overflow:auto;width:100%;height:
> 56px ;"onkeyup="checkPostFieldLength(message,'remaining',
> 400);"onkeydown="checkPostFieldLength(message,'remaining',
> 400);"onmouseout="checkPostFieldLength(message,'remaining', 400);">@<
> %=h @posted_by_name %>:

What happens if you just have, just to check it is not an issue with
the text area
@<%= h posted_by_name %>:

>
> The text within <% %> is the username I am trying to paste by default
> inside the text area
> However when I run the application,I only get" @:" in the text
> area.The name of the user does not appear.
> I have also tried to check using http watch,and I see the url being
> passed correctly,so there is no chance of params[:posted_by] being
> taken as a null value.

You can check the params by looking in log/development.log.

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Rails wiki down

2011-03-03 Thread Xavier Noria
On Thu, Mar 3, 2011 at 9:24 AM, Kivi  wrote:

> Could you please provide the links to these official documentations
> and guides?

Sure: http://rubyonrails.org/documentation.

> I also found the rails wiki incredibly useful when I was
> installing the environment (apache-passenger, rails). I have not found
> equivalently clear information on these topics anywhere else yet.

Please have a look at the excellent documentation of Phusion
Passenger: http://www.modrails.com/documentation.html.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Rails wiki down

2011-03-03 Thread Kivi
On Mar 3, 9:55 am, Xavier Noria  wrote:
> On Thu, Mar 3, 2011 at 8:29 AM, Maxo  wrote:
> > Any idea when it will be up?
>
> > I found lots of interesting materials on wiki, so it is indeed very
> > helpful
>
> There are no plans to bring it up again by now. The wiki had some
> outdated information and was not maintained generally speaking. The
> link to the wiki has been removed also from the sidebar of the
> generated public/index.html etc.
>
> Rails has now two official sets of documentation, the API and the guides.

Hi,

Could you please provide the links to these official documentations
and guides? I also found the rails wiki incredibly useful when I was
installing the environment (apache-passenger, rails). I have not found
equivalently clear information on these topics anywhere else yet.


Best regards,

Kristjan

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Unauthorized Access

2011-03-03 Thread Chandu80
Hi Colin,
Yes the text was appearing from the application.A null value was being
passed due to which the text 'Unauthorized Access' was being rendered.
When I click on Reply,a javascript runs which populates data in the
pop-up.
Thanks

Regards
Chandrika

On Mar 2, 2:59 pm, Colin Law  wrote:
> On 2 March 2011 06:17, Chandu80  wrote:
>
> > Hello All,
> > I have recently begun working on RoR.
> > I am working on a microblogging application.I have a timeline where
> > messages posted by users and his/her followers are being
> > displayed.There is a facility for the logged in user to reply to those
> > messages.(A reply button is present).When I click on a reply message,a
> > popup should appear with a Text area and a Post button.(similar to
> > that in twitter).
> > However when I try to click on reply,the pop-up appears with
> > "Unauthorized Access".
> > What does Unauthorized access imply here?
>
> Does that text come from your application?  Do a global search in your
> code for that string displayed.
> When you click Reply does that run javascript to show the popup or
> does it run an action in the rails app?
> Assuming the latter, have a look in development.log, what do you see
> there when you click on Reply
>
> Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] date type in database becomes nil in rails

2011-03-03 Thread Colin Law
On 2 March 2011 23:24, Ichiro Saga  wrote:
> Hi, there.  I wrote an application in Windows and tried to run it in
> Ubuntu 10.04 64-bit.  The app works fine in windows but I found a
> strange problem when I tested it in Ubuntu.  Two tables in database have
> a column with date type and sqlite3 is able to display the data in the
> column.  However, as I run it from the browser or rails console, all
> data in the column becomes nil.  The ROR settings are the same in both
> OS except that fact that it's running sqlite3 3.6.22 in Ubuntu and
> 3.6.17 in Windows.  I wonder if it has something to do with the setting
> in Ubuntu.  Thank you in advance.

I think you will have to give us a lot more information.  Post the
section from db/schema.rb for the offending table, post the model.rb
(remove any irrelevant methods you have included, but if you have
included a method with a name like the column that does not work then
include that) and post the result of entering, in the console,
model.first or something similar which should fetch a valid record.

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Did rails or shoulda go insane on the inflection of 'taxes'?

2011-03-03 Thread Colin Law
On 2 March 2011 22:40, David Kahn  wrote:
> ...
> Good idea, sorry so "puts 'xp_jurisdiction_taxes'.singularize" while
> inside a spec (cant put it directly inside the shoulda call though) gives
> us:
>
> xp_jurisdiction_tax

In that case it looks as if you are right about it being a shoulda
issue, not using the inflections correctly.

Colin

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.