[Rails] Re: need help with whenever gem

2018-08-21 Thread tom
nevermind - i updated rvm to latest & latest ruby. all good now


On Tue, Aug 21, 2018 at 9:59 AM tom  wrote:

> it used to work just fine until a few days ago. now i am getting:
>
> /home/railsuser/.rvm/gems/ruby-head/gems/bundler-1.16.4/lib/bundler/spec_set.rb:91:in
>  `block in materialize': Could not find rake-12.3.1 in any of the sources 
> (Bundler::GemNotFound)
>
>
>
>
> i have added now this to my schedule.rb file:
>
> ENV.each { |k, v| env(k, v) }
>
> but it only generates now cron jobs for each env variable.
>
> running bundle install on the command line is working just fine - as the
> same user..
>
>
> any ideas?
>
>
> thx
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMeHxhRgsZwVzQRGFRsZWqs_dvLM%2BgHsa%2BmZ%2BPyKo%2Bf%3D%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: Need help for writing Api in Rails 5

2017-01-31 Thread Tushar Garg
Thanks bro for sharing this.
I will check and implement it

On Jan 31, 2017 9:28 PM, "Carlos Ramirez"  wrote:

> Hey Tushar,
>
> There are a lot of great resources online for creating APIs in Rails 5
> (with its new API-only mode).
>
> One of my favorites is called *Building the Perfect Rails 5 API Only App* by
> Kam Low (which I wrote about
> 
> ).
>
> Another that just caught my eye was this one
>  called
> *Best Practices for Designing a Pragmatic RESTful API* by Vinay Sahni. It
> isn't specific to Rails 5, but talks about API best practices and
> recommendations in general. Very comprehensive.
>
> Hope those help!
>
> On Saturday, January 28, 2017 at 9:27:03 AM UTC-5, Tushar Garg wrote:
>>
>> Hi All,
>>
>> I am new to rails.
>> I want to write restful api's in rails. I start following the "API on
>> Rails" book.
>> By following that book, I come to know that there are lot of things are
>> depreciated in rspec, I am getting bulk of error and all things are blown.
>> Please anyone provide me step by step tutorial for writing Rest APi in
>> rails 5
>>
>> Thanks
>> Tushar Garg
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/rubyonrails-talk/XHDZ0IzzWyA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/rubyonrails-talk/cc1af4a4-3a54-46f6-8a51-
> 7845e192facc%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAK6MfSd_gOWQ1Gwb3MZZEF7EQAtnYFVUizCBWuFHw%2B9dK5mJjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help for writing Api in Rails 5

2017-01-31 Thread Carlos Ramirez
Hey Tushar,

There are a lot of great resources online for creating APIs in Rails 5 
(with its new API-only mode).

One of my favorites is called *Building the Perfect Rails 5 API Only App* by 
Kam Low (which I wrote about 

).

Another that just caught my eye was this one 
 called 
*Best Practices for Designing a Pragmatic RESTful API* by Vinay Sahni. It 
isn't specific to Rails 5, but talks about API best practices and 
recommendations in general. Very comprehensive. 

Hope those help!

On Saturday, January 28, 2017 at 9:27:03 AM UTC-5, Tushar Garg wrote:
>
> Hi All,
>
> I am new to rails.
> I want to write restful api's in rails. I start following the "API on 
> Rails" book. 
> By following that book, I come to know that there are lot of things are 
> depreciated in rspec, I am getting bulk of error and all things are blown.
> Please anyone provide me step by step tutorial for writing Rest APi in 
> rails 5
>
> Thanks
> Tushar Garg
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/cc1af4a4-3a54-46f6-8a51-7845e192facc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help for writing Api in Rails 5

2017-01-28 Thread Tushar Garg


On Saturday, January 28, 2017 at 7:57:03 PM UTC+5:30, Tushar Garg wrote:
>
> Hi All,
>
> I am new to rails.
> I want to write restful api's in rails. I start following the "API on 
> Rails" book. 
> By following that book, I come to know that there are lot of things are 
> depreciated in rspec, I am getting bulk of error and all things are blown.
> Please anyone provide me step by step tutorial for writing Rest APi in 
> rails 5
>
> Thanks
> Tushar Garg
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/3a03e560-a980-4020-b79f-f3a5fe3af70d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: need help with devise / async >> ArgumentError (wrong number of arguments (given 3, expected 1..2)):

2016-12-06 Thread tom
great - so i would drop that function into the user-model?

thx


On Tue, Dec 6, 2016 at 11:54 AM, Jerry Clinesmith  wrote:

> devise_async doesn't support Devise 4:  https://github.com/mhfs/
> devise-async/issues/94
>
> Good news, you don't really need it, Devise has a fix to integrate with
> ActiveJob so you can remove the async gem and change your Devise model:
> https://github.com/plataformatec/devise#activejob-integration
>
>
> On Monday, December 5, 2016 at 10:19:28 AM UTC-6, der_tom wrote:
>>
>> it all worked locally, and now i am in production and get that:
>>
>>
>> ArgumentError (wrong number of arguments (given 3, expected 1..2)):
>>   devise-async (0.7.0) lib/devise/async/model.rb:27:in
>> `send_devise_notification'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:117:in
>> `send_confirmation_instructions'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:132:in `block in
>> resend_confirmation_instructions'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:232:in
>> `pending_any_confirmation'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:131:in
>> `resend_confirmation_instructions'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:303:in
>> `send_confirmation_instructions'
>>   devise (4.2.0) app/controllers/devise/confirmations_controller.rb:9:in
>> `create'
>>   actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in
>> `send_action'
>>
>>
>> this happens whenever devise wants to send out emails.
>>
>> im using sidekiq, rails 4.2
>>
>> thx
>> t
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/rubyonrails-talk/b0a70447-69e1-4781-8a84-
> a430077f67aa%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMfpKAa4VWo9MZaPKH_G3fdJL4YyzvU1dzuPLS3JsaDpWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: need help with devise / async >> ArgumentError (wrong number of arguments (given 3, expected 1..2)):

2016-12-06 Thread Jerry Clinesmith
devise_async doesn't support Devise 4: 
 https://github.com/mhfs/devise-async/issues/94

Good news, you don't really need it, Devise has a fix to integrate with 
ActiveJob so you can remove the async gem and change your Devise model:
https://github.com/plataformatec/devise#activejob-integration


On Monday, December 5, 2016 at 10:19:28 AM UTC-6, der_tom wrote:
>
> it all worked locally, and now i am in production and get that:
>
>
> ArgumentError (wrong number of arguments (given 3, expected 1..2)):
>   devise-async (0.7.0) lib/devise/async/model.rb:27:in 
> `send_devise_notification'
>   devise (4.2.0) lib/devise/models/confirmable.rb:117:in 
> `send_confirmation_instructions'
>   devise (4.2.0) lib/devise/models/confirmable.rb:132:in `block in 
> resend_confirmation_instructions'
>   devise (4.2.0) lib/devise/models/confirmable.rb:232:in 
> `pending_any_confirmation'
>   devise (4.2.0) lib/devise/models/confirmable.rb:131:in 
> `resend_confirmation_instructions'
>   devise (4.2.0) lib/devise/models/confirmable.rb:303:in 
> `send_confirmation_instructions'
>   devise (4.2.0) app/controllers/devise/confirmations_controller.rb:9:in 
> `create'
>   actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in 
> `send_action'
>
>
> this happens whenever devise wants to send out emails.
>
> im using sidekiq, rails 4.2
>
> thx
> t
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/b0a70447-69e1-4781-8a84-a430077f67aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: need help with devise / async >> ArgumentError (wrong number of arguments (given 3, expected 1..2)):

2016-12-06 Thread Colin Law
On 6 December 2016 at 14:18, tom  wrote:
> anyone?
>
> thx
>
>
> On Mon, Dec 5, 2016 at 11:18 AM, tom  wrote:
>>
>> it all worked locally, and now i am in production and get that:
>>
>>
>> ArgumentError (wrong number of arguments (given 3, expected 1..2)):
>>   devise-async (0.7.0) lib/devise/async/model.rb:27:in
>> `send_devise_notification'

Are you sure you are using the same versions of gems in both
environments? I presume you have run bundle install in the production
env.

Colin

>>   devise (4.2.0) lib/devise/models/confirmable.rb:117:in
>> `send_confirmation_instructions'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:132:in `block in
>> resend_confirmation_instructions'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:232:in
>> `pending_any_confirmation'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:131:in
>> `resend_confirmation_instructions'
>>   devise (4.2.0) lib/devise/models/confirmable.rb:303:in
>> `send_confirmation_instructions'
>>   devise (4.2.0) app/controllers/devise/confirmations_controller.rb:9:in
>> `create'
>>   actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in
>> `send_action'
>>
>>
>> this happens whenever devise wants to send out emails.
>>
>> im using sidekiq, rails 4.2
>>
>> thx
>> t
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMfrtQTh71gOAb3HGdB%2BG%2BcForPMfuUTosB7gwrqwWwNWg%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv-nzBXXypffNGAk%2BoEePDwXp%2BMXHGC%3DGshwjq1HgJK5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: need help with devise / async >> ArgumentError (wrong number of arguments (given 3, expected 1..2)):

2016-12-06 Thread tom
anyone?

thx


On Mon, Dec 5, 2016 at 11:18 AM, tom  wrote:

> it all worked locally, and now i am in production and get that:
>
>
> ArgumentError (wrong number of arguments (given 3, expected 1..2)):
>   devise-async (0.7.0) lib/devise/async/model.rb:27:in
> `send_devise_notification'
>   devise (4.2.0) lib/devise/models/confirmable.rb:117:in
> `send_confirmation_instructions'
>   devise (4.2.0) lib/devise/models/confirmable.rb:132:in `block in
> resend_confirmation_instructions'
>   devise (4.2.0) lib/devise/models/confirmable.rb:232:in
> `pending_any_confirmation'
>   devise (4.2.0) lib/devise/models/confirmable.rb:131:in
> `resend_confirmation_instructions'
>   devise (4.2.0) lib/devise/models/confirmable.rb:303:in
> `send_confirmation_instructions'
>   devise (4.2.0) app/controllers/devise/confirmations_controller.rb:9:in
> `create'
>   actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in
> `send_action'
>
>
> this happens whenever devise wants to send out emails.
>
> im using sidekiq, rails 4.2
>
> thx
> t
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMfrtQTh71gOAb3HGdB%2BG%2BcForPMfuUTosB7gwrqwWwNWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help with creating a Sidekiq Job

2016-04-26 Thread David Williams
David Williams wrote in post #1183093:

These lines of code are working

orphans = SimpleHashtag::Hashtag.all.select {|h| h.hashtaggables.size == 
0}
orphans.map(&:destroy)

But, in order for the perform method to fire off. You need an argument 
to go along with 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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/69c939698f54fc1b8f6ba00e10b4f479%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: Need help upgrading to Rails 5

2015-12-30 Thread James Jelinek (shakycode)
Yeah you have to specify the version number prior to the “new” verb.  I think 
this is especially important when you have multiple versions of the Rails gem 
installed on your system.


> On Dec 30, 2015, at 11:15 AM, Dan Cromer  wrote:
> 
> I was able to fix this.  The problem was that I did not generate my new rails 
> project using the Rails 5 generator.  Instead, when I did
> 
> rails _5.0.0.beta1_ new myapp
> 
> Everything worked
> 
> On Wednesday, 30 December 2015 01:36:42 UTC-8, Dan Cromer wrote:
> I'm experiencing the same problem.  I'm not trying to upgrade an app, though, 
> I'm only trying to play with a new rails app from the ground up, just to try 
> out some of the new features.
> 
> Have you been able to figure out what the problem is?
> 
> On Wednesday, 23 December 2015 06:55:59 UTC-8, Johan Andersson wrote:
> Hi,
> 
> I'm trying to upgrade to Rails 5. I've followed the official upgrade guide. 
> When I visit any url, I only see the message:
> 
> We're sorry, but something went wrong
> If you are the application owner check the logs for more information.
> 
> And the only thing I see in the logs is:
> 
> Started GET "/" for ::1 at 2015-12-23 14:57:38 +0100
> 
> It doesn't matter what url I visit, the same thing happens.
> 
> Any suggestions? Thanks!
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to rubyonrails-talk@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/11974a92-502b-436b-b967-9fd44336df4a%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/131DF96B-00B1-43FC-9448-E18ACB839B71%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help upgrading to Rails 5

2015-12-30 Thread Dan Cromer
I was able to fix this.  The problem was that I did not generate my new 
rails project using the Rails 5 generator.  Instead, when I did

rails _5.0.0.beta1_ new myapp

Everything worked

On Wednesday, 30 December 2015 01:36:42 UTC-8, Dan Cromer wrote:
>
> I'm experiencing the same problem.  I'm not trying to upgrade an app, 
> though, I'm only trying to play with a new rails app from the ground up, 
> just to try out some of the new features.
>
> Have you been able to figure out what the problem is?
>
> On Wednesday, 23 December 2015 06:55:59 UTC-8, Johan Andersson wrote:
>>
>> Hi,
>>
>> I'm trying to upgrade to Rails 5. I've followed the official upgrade 
>> guide. When I visit any url, I only see the message:
>>
>> We're sorry, but something went wrong
>>> If you are the application owner check the logs for more information.
>>
>>
>> And the only thing I see in the logs is:
>>
>> Started GET "/" for ::1 at 2015-12-23 14:57:38 +0100
>>
>>
>> It doesn't matter what url I visit, the same thing happens.
>>
>> Any suggestions? Thanks!
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/11974a92-502b-436b-b967-9fd44336df4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help upgrading to Rails 5

2015-12-30 Thread Dan Cromer
I'm experiencing the same problem.  I'm not trying to upgrade an app, 
though, I'm only trying to play with a new rails app from the ground up, 
just to try out some of the new features.

Have you been able to figure out what the problem is?

On Wednesday, 23 December 2015 06:55:59 UTC-8, Johan Andersson wrote:
>
> Hi,
>
> I'm trying to upgrade to Rails 5. I've followed the official upgrade 
> guide. When I visit any url, I only see the message:
>
> We're sorry, but something went wrong
>> If you are the application owner check the logs for more information.
>
>
> And the only thing I see in the logs is:
>
> Started GET "/" for ::1 at 2015-12-23 14:57:38 +0100
>
>
> It doesn't matter what url I visit, the same thing happens.
>
> Any suggestions? Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/411f1de3-aabc-49c3-887e-1c23e9a7bb98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help upgrading to Rails 5

2015-12-29 Thread raoul
Hi Johan,

Depending on how you've configured your app, your app is probably 
suppressing detailed error messages through a config setting. Once you see 
what the exact error is, you can start to fix the actual cause.

Send me an email, I've got some time today and tomorrow and can potentially 
help you debug if you're still stuck. Firstname at prela.io

Best,
 - Raoul

On Wednesday, December 23, 2015 at 10:55:59 PM UTC+8, Johan Andersson wrote:
>
> Hi,
>
> I'm trying to upgrade to Rails 5. I've followed the official upgrade 
> guide. When I visit any url, I only see the message:
>
> We're sorry, but something went wrong
>> If you are the application owner check the logs for more information.
>
>
> And the only thing I see in the logs is:
>
> Started GET "/" for ::1 at 2015-12-23 14:57:38 +0100
>
>
> It doesn't matter what url I visit, the same thing happens.
>
> Any suggestions? Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/0d59478b-bb6c-473e-8a83-060036a39aa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help for Nokogiri XML parser

2015-02-25 Thread Frederick Cheung


On Wednesday, February 25, 2015 at 9:40:39 AM UTC, bette...@gmail.com wrote:
>
> Hi,
>
> I am facing issue with the Nokogiri XML Parser:
>
> I am using the following code to parse:
>
> doc = Nokogiri::HTML.fragment(xml)
> puts doc.to_xml
>

What is the input you're feeding it? if the input is malformed, then 
nokogiri will have to guess at how to fix it.

Fred 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/e9c47452-4bc4-4c54-b048-b31d48edfb0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: need help to code a blog archive on click month and year .it should display that months post

2015-02-06 Thread Frederick Cheung


On Friday, February 6, 2015 at 12:21:09 PM UTC, Ruby-Forum.com User wrote:
>
> can u help me understand this code 
>  href='/blog?month=" + monthname[0..-6] + "&year=" + monthname[3..8] + 
> "'>" + date_value + " 
>
>
the numbers and all 
>

This is the String#[] method 
http://www.ruby-doc.org/core-2.2.0/String.html#method-i-5B-5D 

monthname[0..-6] returns the string from the first character until the one 
6 from the end (negative indexes count from the end of strings)

monthname[3..8] returns from index 3 (i.e. the 4th character) until the one 
at index 8 

So if your string is "06 2015" then monthname[0..-6] is "06" and 
monthname[3..8] returns "2015"  (given the length of the string 
monthname[3..6] would return the same string)

Using strings that have to be torn apart like this does seem a little bit 
obtuse though.

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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/80bd132e-5d1c-4cca-b2cc-54f112e5232f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: need help to code a blog archive on click month and year .it should display that months post

2015-02-06 Thread Sailatha K.
can u help me understand this code
" + date_value + "

the numbers and all

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/a3e64414c00ad62d86722f2bfc26bb6f%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: need help to code a blog archive on click month and year .it should display that months post

2015-02-06 Thread Frederick Cheung


On Friday, February 6, 2015 at 11:33:03 AM UTC, Ruby-Forum.com User wrote:
>
> My app/controllers/blog_controller.rb: 
>
>
To be honest, I don't think many people (certainly not me) want to read 
though a wall of code to work out which bits are relevant and which aren't. 
It's up to you as question asker to do extract from your application what 
is relevant and what isn't. It would however be a lot clearer if you split 
out some of this into helpers rather than having it all inline in your view


Fred
 

> class BlogController < ApplicationController 
>   require 'date' 
>
>   caches_page :index, :show 
>
>   def index 
>   if (params[:population_categories]) 
>   @blog_posts = BlogPost.live.where(:population_category_ids => 
> params[:population_categories]).latest.page(params[:page]) 
>   # @blog_posts = BlogPost.find(:all, :conditions => ['created_at > 
> ? AND created_at < ?', b_dt.strftime("%Y-%m-%d %H:%M"), 
> e_dt.strftime("%Y-%m-%d %H:%M")]).latest.page(params[:page]) 
> elsif (params[:month]) 
>   b_dt = DateTime.strptime("01/" + params[:month].to_s + "/" + 
> params[:year] + " 00:00", "%d/%m/%Y %H:%M") 
>   e_dt = DateTime.strptime("01/" + (params[:month].to_i+1).to_s + 
> "/" + params[:year] + " 00:00", "%d/%m/%Y %H:%M") 
>
>   @blog_posts = BlogPost.live.where(:created_at => 
> b_dt.strftime("%Y-%m-%d %H:%M DESC")..e_dt.strftime("%Y-%m-%d %H:%M 
> DESC") ).latest.page(params[:page] ) 
>
>   #@blog_posts = @posts.group_by { |t| t.publication_date 
> .beginning_of_month } 
> else 
>   @blog_posts = 
> BlogPost.live.keyword(params[:keyword]).latest.page(params[:page]) 
> end 
>  @posts_by_month = BlogPost.all.group_by { |post| 
> post.created_at.strftime("%m %Y") } 
>   end 
>   def show 
> @blog_post = BlogPost.where(:url_fragment => 
> params[:url_fragment]).first 
> raise ActionController::RoutingError.new('Not Found') if 
> @blog_post.nil? 
> @blog_posts = 
> BlogPost.live.keyword(params[:keyword]).latest.page(params[:page]) 
>   @posts_by_month = BlogPost.all.group_by { |post| 
> post.created_at.strftime("%m %Y") } 
>   end 
>   def feed 
> @posts_feed = BlogPost.where(:content_state => 'live') 
> respond_to do |format| 
>   format.atom { render layout: false } 
> end 
>   end 
> end 
>
>  app/controllers/month_posts_controler: 
>
> class MonthPostsController < ApplicationController 
>   def display 
>   @posts_by_month = BlogPost.all.group_by { |post| 
> post.created_at.strftime("%B") } 
>   #@posts_by_month = BlogPost.all.each { |post| 
> post.created_at.strftime("December") } 
>
>   end 
>   def show 
>   @posts = BlogPost.all.find(params[:id]) 
>   @posts = Post.includes(:comments).order("created_at DESC").limit(5) 
> end 
> end 
>
>
> app/controllers/post_controller: 
> def index 
> @posts = Post.all 
>
> respond_to do |format| 
>   format.html # index.html.erb 
>   format.json { render json: @posts } 
>   format.atom 
> end 
> end 
>
> app/views/blog/index.html.erb 
>  
>
>  
>
>   <% @blog_posts.limit(3).each do |post| %> 
> <% @section_keywords += post.keywords_array %> 
> <%= render :partial => '/blog/index/blog_post', :locals => 
> {:atom => post} %> 
>   <% end %> 
>
>  
>   ARCHIVES 
>
>
>  
> <% archive_string = "" %> 
> <% date_value = "" %> 
> <% @posts_by_month.each do |monthname, posts| %> 
>
>   <% date_value = (Date::MONTHNAMES[monthname[0..-6].to_i]) + " 
> " + (monthname[3..8]) %> 
>   <% archive_string = "" + date_value + 
> "" + archive_string %> 
> <% end %> 
> <%= raw archive_string %> 
>  
>
>
>
>  
>  
>
>  
> <%= auto_discovery_link_tag(:rss, feed_url(:format => :atom)) %> 
>
>
>  
>
> app/views/blog/show.html.erb: 
>  
>
>
>   
> ARCHIVES 
>  
>
>   <% archive_string = "" %> 
>   <% date_value = "" %> 
>   <% @posts_by_month.each do |monthname, posts| %> 
>   <% date_value = (Date::MONTHNAMES[monthname[0..-6].to_i]) + " " + 
> (monthname[3..8]) %> 
>   <% if(date_value == pub_date) %> 
>   <% archive_string = " href='/blog?month=" + monthname[0..-6] + "&year=" + monthname[3..8] + 
> "'>" + date_value + "" + archive_string %> 
> <% else %> 
> <% archive_string = "" + date_value + 
> "" + archive_string %> 
> <% end %> 
> <% end %> 
>   <%= raw archive_string %> 
>
>
>
>
>
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-

[Rails] Re: need help to code a blog archive on click month and year .it should display that months post

2015-02-06 Thread Sailatha K.
My app/controllers/blog_controller.rb:

class BlogController < ApplicationController
  require 'date'

  caches_page :index, :show

  def index
  if (params[:population_categories])
  @blog_posts = BlogPost.live.where(:population_category_ids =>
params[:population_categories]).latest.page(params[:page])
  # @blog_posts = BlogPost.find(:all, :conditions => ['created_at >
? AND created_at < ?', b_dt.strftime("%Y-%m-%d %H:%M"),
e_dt.strftime("%Y-%m-%d %H:%M")]).latest.page(params[:page])
elsif (params[:month])
  b_dt = DateTime.strptime("01/" + params[:month].to_s + "/" +
params[:year] + " 00:00", "%d/%m/%Y %H:%M")
  e_dt = DateTime.strptime("01/" + (params[:month].to_i+1).to_s +
"/" + params[:year] + " 00:00", "%d/%m/%Y %H:%M")

  @blog_posts = BlogPost.live.where(:created_at =>
b_dt.strftime("%Y-%m-%d %H:%M DESC")..e_dt.strftime("%Y-%m-%d %H:%M
DESC") ).latest.page(params[:page] )

  #@blog_posts = @posts.group_by { |t| t.publication_date
.beginning_of_month }
else
  @blog_posts =
BlogPost.live.keyword(params[:keyword]).latest.page(params[:page])
end
 @posts_by_month = BlogPost.all.group_by { |post|
post.created_at.strftime("%m %Y") }
  end
  def show
@blog_post = BlogPost.where(:url_fragment =>
params[:url_fragment]).first
raise ActionController::RoutingError.new('Not Found') if
@blog_post.nil?
@blog_posts =
BlogPost.live.keyword(params[:keyword]).latest.page(params[:page])
  @posts_by_month = BlogPost.all.group_by { |post|
post.created_at.strftime("%m %Y") }
  end
  def feed
@posts_feed = BlogPost.where(:content_state => 'live')
respond_to do |format|
  format.atom { render layout: false }
end
  end
end

 app/controllers/month_posts_controler:

class MonthPostsController < ApplicationController
  def display
  @posts_by_month = BlogPost.all.group_by { |post|
post.created_at.strftime("%B") }
  #@posts_by_month = BlogPost.all.each { |post|
post.created_at.strftime("December") }

  end
  def show
  @posts = BlogPost.all.find(params[:id])
  @posts = Post.includes(:comments).order("created_at DESC").limit(5)
end
end


app/controllers/post_controller:
def index
@posts = Post.all

respond_to do |format|
  format.html # index.html.erb
  format.json { render json: @posts }
  format.atom
end
end

app/views/blog/index.html.erb

  


  <% @blog_posts.limit(3).each do |post| %>
<% @section_keywords += post.keywords_array %>
<%= render :partial => '/blog/index/blog_post', :locals =>
{:atom => post} %>
  <% end %>


  ARCHIVES
  


<% archive_string = "" %>
<% date_value = "" %>
<% @posts_by_month.each do |monthname, posts| %>

  <% date_value = (Date::MONTHNAMES[monthname[0..-6].to_i]) + "
" + (monthname[3..8]) %>
  <% archive_string = "" + date_value +
"" + archive_string %>
<% end %>
<%= raw archive_string %>



  


  

<%= auto_discovery_link_tag(:rss, feed_url(:format => :atom)) %>

  


app/views/blog/show.html.erb:


  
 
ARCHIVES

  
  <% archive_string = "" %>
  <% date_value = "" %>
  <% @posts_by_month.each do |monthname, posts| %>
  <% date_value = (Date::MONTHNAMES[monthname[0..-6].to_i]) + " " +
(monthname[3..8]) %>
  <% if(date_value == pub_date) %>
  <% archive_string = "" + date_value + "" + archive_string %>
<% else %>
<% archive_string = "" + date_value +
"" + archive_string %>
<% end %>
<% end %>
  <%= raw archive_string %>
  

  
  

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/5e42100de3af4691c0f0c11bb807a733%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: need help to code a blog archive on click month and year .it should display that months post

2015-02-06 Thread Frederick Cheung
On Friday, February 6, 2015 at 7:09:52 AM UTC, Ruby-Forum.com User wrote:
> i am try to change existing code,i am not unserstanding code,it is
> written for blog archive clicking on each month and year in right column
> it should redirect to that clicked month.by the  below code only few are
> working not all months,december is giving invalid date error

The confusing bit for me in the below code is monthname - its clearly not the 
name of the month because it's used both as an index into an array of month 
names and to extract year information - what does it contain?

What happens precisely when you click on December (what parameters are sent 
with the request and what is the code that raises an exception?)

Fred


>div class="right-col">
>   ARCHIVES
>   
> 
> 
> <% archive_string = "" %>
> <% date_value = "" %>
>   <% @posts_by_month.each do |monthname,posts| %>
> 
>   <% date_value = (Date::MONTHNAMES[monthname[0..-6].to_i]) + "
> " + (monthname[3..8]) %>
>   <% archive_string = "" + date_value +
> "" + archive_string %>
> <% end %>
> <%= raw archive_string %>
> 
> 
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/5e15766d-b1ff-4fa8-a23c-ec9744e023d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help for Resque job.

2014-08-17 Thread Bala Paranj
Have you looked at the resque-web interface? What do you see in the 
'Statuses' tab? This article on 'How to Install and Configure Resque to 
Handle Background Jobs in Rails 4.1' http://www.rubyplus.com/articles/531 
might help.

On Thursday, August 14, 2014 3:11:02 AM UTC-7, bette...@gmail.com wrote:
>
> Hi Friends,
>
> I have a scenario where I am calling a resque jobs within the resque job 
> which is already initiated.
>
> The below mentioned infinite code is just a example: The code will 
> executed till all the jobs are not completed. BUT the issue is that when I 
> write the below code the jobs never completed. It get stucked somewhere.
>
> NOTE: 
> 1. If I am not writing the below code then it work well. 
> 2. I am using below code to let the system know that the job is completed.
> 3. I have used the resque-status but my required is different so 
> resque-status won't help much.
> 4. Just wanted to know if there is any way I can let the system auto know 
> that the job is done.
>
> count   = 0
> loop do
> break if job_ids.blank?
> 
> job_id  = job_ids[count]
> job = Resque::Plugins::Status::Hash.get(job_id)
> 
> if job["status"].eql?('completed')
> job_ids.delete(job_id)
> elsif job_id["status"].eql?('failed')
> return false
> end
> count = count.eql?(1) ? 0 : 1
> sleep(10)
> end
>
> Thank you, for all your help
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/7e0bb0e6-dcd0-4c94-b2ca-0db576cced22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Re: Need help for Resque job.

2014-08-15 Thread javinto
Hi,

Resque works with Redis. Why not use Redis to keep track of executed jobs?

Jan

Op donderdag 14 augustus 2014 12:11:02 UTC+2 schreef bette...@gmail.com:
>
> Hi Friends,
>
> I have a scenario where I am calling a resque jobs within the resque job 
> which is already initiated.
>
> The below mentioned infinite code is just a example: The code will 
> executed till all the jobs are not completed. BUT the issue is that when I 
> write the below code the jobs never completed. It get stucked somewhere.
>
> NOTE: 
> 1. If I am not writing the below code then it work well. 
> 2. I am using below code to let the system know that the job is completed.
> 3. I have used the resque-status but my required is different so 
> resque-status won't help much.
> 4. Just wanted to know if there is any way I can let the system auto know 
> that the job is done.
>
> count   = 0
> loop do
> break if job_ids.blank?
> 
> job_id  = job_ids[count]
> job = Resque::Plugins::Status::Hash.get(job_id)
> 
> if job["status"].eql?('completed')
> job_ids.delete(job_id)
> elsif job_id["status"].eql?('failed')
> return false
> end
> count = count.eql?(1) ? 0 : 1
> sleep(10)
> end
>
> Thank you, for all your help
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/74e61bdb-8153-4bfb-bd94-aa9f8d4c5160%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: Need help -FATAL: database "catarse_development" does not exist

2014-02-18 Thread Colin Law
On 18 February 2014 12:11, Pop Pop  wrote:
> yes i want to rake db:create
> and fix the Errer 'FATAL:  database "catarse_development" does not exist
> How i fix that

I think that it was rake db:migrate that gave you that error, I think
it unlikely that db:create also gave it.  If it does then copy/paste
the command and result here.

Also please remember to quote the previous message, this is an email
list not a forum, though you may be accessing it via a forum like
interface.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvBrv%2BYTg7pgiva6Ye61YiMSDgdzt3UgxE-fm9VQWEnmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Need help -FATAL: database "catarse_development" does not exist

2014-02-18 Thread Pop Pop
yes i want to rake db:create
and fix the Errer 'FATAL:  database "catarse_development" does not exist
How i fix that

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/55a877e05d2a775ff5c573017c3b2a17%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Need help -FATAL: database "catarse_development" does not exist

2014-02-18 Thread Rick
you want to do: rake db:create

On Tuesday, February 18, 2014 5:08:05 AM UTC-5, Ruby-Forum.com User wrote:
>
> Hi i try to do that createdb mytestdb 
> [root@localhost catarse]# createdb mytestdb 
> createdb: could not connect to database postgres: FATAL:  role "root" 
> does not exist 
> give this Errer 
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/c3d8108d-790b-4e1e-bd3c-88b2dea0b5d5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: Need help -FATAL: database "catarse_development" does not exist

2014-02-18 Thread Pop Pop
Hi i try to do that createdb mytestdb
[root@localhost catarse]# createdb mytestdb
createdb: could not connect to database postgres: FATAL:  role "root" 
does not exist
give this Errer
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/b3780d78f0884bebc12557f4b0745e2b%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Rails] Re: need help deploying rails engine

2014-01-15 Thread jsnark
Problem solved.

The namespaced paths generated by engine.path need to be modified by 
prefixing them with the applications base path. I use the apache 
RewriteRule for this:

RewriteRule ^/engine/?(.*) /app/engine/$1 [R]

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/2fbc3d1f-0232-40c0-bc97-0c5afc749fa4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] Re: Need help putting together a rails workflow diagram

2013-05-31 Thread 3dd13
When u say u need a workflow diagram, I assume u are talking about the data
flow or communication sequence

So to help u solve this problem, one hint is
u have to illustrate how the components talks to each other when there is a
http request coming in

For example, in the case of "user wants to create a post message"
U have to write down
What data is passed from the browser to these group if components ?
Which one of these components receive the http request first ?
What information is passed from one component to another ?

Hope this help.



On Friday, May 31, 2013, Hassan Schroeder wrote:

> On Fri, May 31, 2013 at 6:02 AM, Seth F. >
> wrote:
> > I have a basic knowledge of all of them, but the main reason of this
> > task is to try and understand the logic of updating and maintaining the
> > system. Basically, I'm trying to complete a puzzle of how these work
> > together / in what way each of them reference eachother.
>
> Maybe you should start by defining the two primary end points --
> start, finish -- of the flow, and see how those pieces fit into that.
>
> Also, it might be good to demonstrate that "basic knowledge" by
> writing a 1-sentence description of the primary role of each of the
> pieces you listed  :-)
>
> --
> Hassan Schroeder  
> hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com .
> To post to this group, send email to 
> rubyonrails-talk@googlegroups.com
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAN9iPuTzH2jCb16M3C2P_hQaAR2sqb8rXxBrom1_BTNw%40mail.gmail.com?hl=en-US
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAMGzbWGC3rOMnaDDKMyeefakCzhmzGFoUAUam1qO-ASg-%3DD2UQ%40mail.gmail.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help putting together a rails workflow diagram

2013-05-31 Thread Hassan Schroeder
On Fri, May 31, 2013 at 6:02 AM, Seth F.  wrote:
> I have a basic knowledge of all of them, but the main reason of this
> task is to try and understand the logic of updating and maintaining the
> system. Basically, I'm trying to complete a puzzle of how these work
> together / in what way each of them reference eachother.

Maybe you should start by defining the two primary end points --
start, finish -- of the flow, and see how those pieces fit into that.

Also, it might be good to demonstrate that "basic knowledge" by
writing a 1-sentence description of the primary role of each of the
pieces you listed  :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAN9iPuTzH2jCb16M3C2P_hQaAR2sqb8rXxBrom1_BTNw%40mail.gmail.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: Need help putting together a rails workflow diagram

2013-05-31 Thread Seth F.
I have a basic knowledge of all of them, but the main reason of this 
task is to try and understand the logic of updating and maintaining the 
system. Basically, I'm trying to complete a puzzle of how these work 
together / in what way each of them reference eachother.

Thanks for your 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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/b8ed2be0161a6f3f5f7788905bc63fa0%40ruby-forum.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help on #grep

2013-05-13 Thread Javier Quarite
On Mon, May 13, 2013 at 2:03 PM, Javier Quarite  wrote:

> Try:
>
>  ObjectSpace.each_object(Class).to_a.map(&:to_s).grep(/(stri)/i)
>

Sorry, no need of "to_a" :)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help on #grep

2013-05-13 Thread Javier Quarite
Try:

 ObjectSpace.each_object(Class).to_a.map(&:to_s).grep(/(stri)/i)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: Need help on #grep

2013-05-13 Thread Love U Ruby
I got only one:

ObjectSpace.each_object(Class).map(&:name).grep(/stri/i)
#=> ["String"]

How to get all using regex,which has a substring `stri`?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: Need help on #grep

2013-05-13 Thread Robert Walker
Love U Ruby wrote in post #1108785:
> I was trying to list the all the class names having the pattern `stri`
> with the below:
>
> p ObjectSpace.each_object(Class).to_a.grep(/(stri)/i) #=> []
>
> But not getting the output. So can anyone help me on the same?

ObjectSpace.each_object(Class) is returning an Enumerator of Class 
object. Then you are shoving a bunch of class objects into an array and 
then expecting grep to know what to do with them.

If you were to run:

irb(main):> ObjectSpace.each_object(Class) { |x| p x.class }
Class
Class
Class
...
...
...
=> 383

Calling to_a on that Enumerator you get an array of Class objects, NOT 
strings. When sending the grep message to an Array return any elements 
where Pattern === element.

What you probably want instead is an array of class names as strings not 
Class objects. Then grep should work just fine.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: need help to install Nokogiri

2013-04-30 Thread Jordon Bedwell
On Mon, Apr 29, 2013 at 2:24 PM, Love U Ruby  wrote:

> kirti@kirti-Aspire-5733Z:~$ irb
> 2.0.0p0 :001 > require 'nokogiri'
>  => true
> 2.0.0p0 :002 >
>


Just to give you a heads up for next time: `curl -L
https://get.rvm.io|bash -s head --ruby=2.0.0 --autolibs=enabled` would
have installed
everything from libxml2 down to Git for you and installed Ruby 2.0.0 and
Rails as well.  You can see a list of what we install for you here:
https://github.com/wayneeseguin/rvm/blob/master/scripts/functions/requirements/ubuntu#L83

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: need help to install Nokogiri

2013-04-29 Thread Love U Ruby
Finally i am done:

kirti@kirti-Aspire-5733Z:~$ sudo apt-get install libxml2-dev 
libxslt1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libxml2-dev is already the newest version.
libxslt1-dev is already the newest version.
The following package was automatically installed and is no longer 
required:
  vim-runtime
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

kirti@kirti-Aspire-5733Z:~$ gem install nokogiri
Fetching: nokogiri-1.5.9.gem (100%)
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.5.9
Parsing documentation for nokogiri-1.5.9
unable to convert "\x90" from ASCII-8BIT to UTF-8 for 
lib/nokogiri/nokogiri.so, skipping
Installing ri documentation for nokogiri-1.5.9
1 gem installed

kirti@kirti-Aspire-5733Z:~$ irb
2.0.0p0 :001 > require 'nokogiri'
 => true
2.0.0p0 :002 >

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: need help to install Nokogiri

2013-04-29 Thread Colin Law
On 29 April 2013 18:08, Love U Ruby  wrote:
> Carlos Mathiasen wrote in post #1107144:
>> Nokogiri is a gem, them you only need
>>
>>   gem install nokogiri
>>
>> but first you need install this libraries for ubuntu[0]:
>>
>>   sudo apt-get install libxml2 libxml2-dev libxslt libxslt-de
>
> Tried but got error:
>
> kirti@kirti-Aspire-5733Z:~$ sudo apt-get install libxml2 libxml2-dev
> libxslt libxslt-dev
> [sudo] password for kirti:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
> E: Unable to locate package libxslt

You don't need libxslt, which is lucky as it does not exist.  Repeat
the apt-get but leave out libxslt.

Colin

> kirti@kirti-Aspire-5733Z:~$
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: need help to install Nokogiri

2013-04-29 Thread Love U Ruby
Carlos Mathiasen wrote in post #1107144:
> Nokogiri is a gem, them you only need
>
>   gem install nokogiri
>
> but first you need install this libraries for ubuntu[0]:
>
>   sudo apt-get install libxml2 libxml2-dev libxslt libxslt-de

Tried but got error:

kirti@kirti-Aspire-5733Z:~$ sudo apt-get install libxml2 libxml2-dev 
libxslt libxslt-dev
[sudo] password for kirti:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
E: Unable to locate package libxslt
kirti@kirti-Aspire-5733Z:~$

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: need help to install Nokogiri

2013-04-29 Thread Colin Law
On 29 April 2013 05:47, Love U Ruby  wrote:
> Carlos Mathiasen wrote in post #1107144:
>> Nokogiri is a gem, them you only need
>>
>>   gem install nokogiri
>>
>> but first you need install this libraries for ubuntu[0]:
>>
>>   sudo apt-get install libxml2 libxml2-dev libxslt libxslt-dev
>
> As I installed Ruby using RVM, I thought I need to install everything
> using RVM. So if I do `sudo` to install nokogiri then will it work?

If using rvm you must /not/ use sudo when installing gems.  However
you should not need to install it manually, just put it in Gemfile for
the application and bundle install will automatically install it.  You
do need sudo for installing the libxml stuff of course.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: need help to install Nokogiri

2013-04-28 Thread Love U Ruby
Carlos Mathiasen wrote in post #1107144:
> Nokogiri is a gem, them you only need
>
>   gem install nokogiri
>
> but first you need install this libraries for ubuntu[0]:
>
>   sudo apt-get install libxml2 libxml2-dev libxslt libxslt-dev

As I installed Ruby using RVM, I thought I need to install everything 
using RVM. So if I do `sudo` to install nokogiri then will it work?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: Need help even generating a new app

2013-01-17 Thread Robert Walker
Josh Aronoff wrote in post #1092595:
> Ok cool... Ugh, this permissions thing is driving me nuts. Can I just
> uninstall everything by deleting all the directories and re running the
> ruby and rails instals using either homebrow or rvm? to be clear, I'm
> only saying delete the ruby directory in my Library.

What exactly do you mean by "Library". There are several of those on OS 
X.

/System/Library
System owned library. Definitely DO NOT delete, or otherwise touch 
anything here.

/Library
Global library for third-party application use, not user specific. 
Slightly less dangerous to mess with this stuff, but you shouldn't have 
to.

~/Library
This is you're library where you're user specific Preferences, 
Application Support, Caches, etc. are kept. You're free to do whatever 
you wish with this stuff.

With that out of the way I'll see if I can flesh this out a bit more...

Whether you choose RVM or rbenv, both (by default) create a hidden 
directory that is maintained by those tools. The tools are designed to 
be as unobtrusive to the normal operation of the operating system as 
possible (rbenv even more so than RVM).

You should see something like this:

$ cd ~
$ ls -la

-rw-r--r--@  1 robertwalker  staff  15364 Jan 14 16:42 .DS_Store
drwx--   3 robertwalker  staff102 Apr  5  2011 .MacOSX
drwxrwxrwt@  3 robertwalker  staff102 Apr 13  2011 .TemporaryItems
drwx--   2 robertwalker  staff 68 Jan 17 09:14 .Trash
...
drwxr-xr-x   5 robertwalker  staff170 Jul 19 13:56 .rbenv

If you notice that .rbenv (or .rvm) have a user other than yourself 
(e.g. root) your can fix that with:

$ chown -R robertwalker:staff .rbenv

Changes ownership of .rbenv and all it's contents recursively to user 
"robertwalker" and group "staff".

You must also make sure your PATH is configured properly for rbenv or 
RVM to work properly.

$ echo $PATH

/Users/robertwalker/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin

Notice here that /Users/robertwalker/.rbenv/shims is the first path in 
the PATH environment variable. In the case of rbenv this is added by 
inserting this line...

# Enable rbenv shims and autocompletion
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

somewhere in your .profile (or similar) file. RVM has a similar setup. 
Read their docs for more.

Once you verify these things make sure to tell rbenv (or RVM) which 
version of your installed Rubies to use:

$ rbenv global 1.9.3-p327

That should be all that's necessary to get going with rbenv or RVM. I 
would recommend against messing with your system's built-in Ruby, or 
anything inside /System/Library or /Library.

-- 
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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help even generating a new app

2013-01-16 Thread Josh Aronoff
Ok cool... Ugh, this permissions thing is driving me nuts. Can I just 
uninstall everything by deleting all the directories and re running the 
ruby and rails instals using either homebrow or rvm? to be clear, I'm 
only saying delete the ruby directory in my Library.

-- 
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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help understanding how to add and/remove objects within nested form / Rails Mentor Needed

2013-01-16 Thread Frederick Cheung


On Wednesday, January 16, 2013 8:49:52 AM UTC, RJD wrote:
>
> Hi,
>
> I posted this question on stackoverflow and figured I would post here as 
> well. 
>
> http://stackoverflow.com/questions/14348974/need-help-understanding-how-to-add-and-remove-objects-within-nested-form
>
> I'm basically looking for 2 things:
> 1. Any guidance I can get regarding this question.
>

I gave an answer to your question.
 

> 2. A mentor who is willing to offer some time to help answer my crazy 
> questions. I'm the only Rails developer I know as most of my developer 
> friends haven't taken the time to figure out Rails (not sure why). Mailing 
> lists and forums are ok but not real-time. If you are someone that knows 
> Rails inside and out, I would love to talk to you, buy you dinner, hang 
> out, drink beer, and talk Rails. I'm in Santa Barbara, CA but am close 
> enough to LA to meetup. 
>
> You could try railsmentors.org

Fred
 

> Thank you
> RJD
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/YxRcZswI_E8J.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help even generating a new app

2013-01-15 Thread Johnneylee Rollins
Hey,

This is because you installed rvm, which is my preference but I have no
qualms about you using rbenv. For some reason the permissions on something
in your rvm directory got changed.

sudo chown -r $USER:/$USER $HOME/.rvm

That will help there. I can help you continue to use rvm if you want. If
~/.rvm/scripts/rvm is sourced in your shell, you likely just need to set a
new default ruby.

rvm list # lists locally installed rubies

You might want to make sure you have the one you want. I suggest rvm
install 1.9.3, which gets you the latest patch set rvm knows about.

After that, you do this

rvm use  --default

Whichever system you use, for simplicity, I'd suggest removing the other.

~Spaceghost
On Jan 15, 2013 12:01 AM, "Josh Aronoff"  wrote:

> OK I went the Homebrew route, after some googling and tried to
> update my 1.8.7 Ruby to 1.9.3 like you mentioned and I'm STILL running
> into a permissions thing with my Library and that Gems directory.
>
> After running $ gem install rails bundler unicorn pg 
>
> I get this:
>
> Permission denied -
> /Users/aronoff/.rvm/gems/ruby-1.9.3-p194/cache/activesupport-3.2.11.gem
>
>
> -
>
> Is this a chmod thing I need to do? I'm not that familiar with that kind
> of stuff either. Thank you all for your help, I really appreciate 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 https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help even generating a new app

2013-01-14 Thread Josh Aronoff
OK I went the Homebrew route, after some googling and tried to 
update my 1.8.7 Ruby to 1.9.3 like you mentioned and I'm STILL running 
into a permissions thing with my Library and that Gems directory.

After running $ gem install rails bundler unicorn pg 

I get this:

Permission denied - 
/Users/aronoff/.rvm/gems/ruby-1.9.3-p194/cache/activesupport-3.2.11.gem


-

Is this a chmod thing I need to do? I'm not that familiar with that kind 
of stuff either. Thank you all for your help, I really appreciate 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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help even generating a new app

2013-01-14 Thread Josh Aronoff
Ok. got to Step 3:

and then ran into this::

Installing yaml-0.1.4...

BUILD FAILED

Inspect or clean up the working tree at 
/var/folders/3r/hdtty71s32bd26yrzyq4m5lrgn/T/ruby-build.20130114234238.25080
Results logged to 
/var/folders/3r/hdtty71s32bd26yrzyq4m5lrgn/T/ruby-build.20130114234238.25080.log

Last 10 log lines:
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in 
`/var/folders/3r/hdtty71s32bd26yrzyq4m5lrgn/T/ruby-build.20130114234238.25080/yaml-0.1.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details





Also, while installing rbenv, I got a warning saying that the cleaning 
step did not complete successfully. Argh

-- 
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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help even generating a new app

2013-01-14 Thread Josh Aronoff
thank you! I'll try this and let you know how it went!! Thanks for
responding!

-- 
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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help even generating a new app

2013-01-14 Thread Robert Walker
Robert Walker wrote in post #1092320:
> Step 2: Install and configure rbenv and ruby-build using Homebrew.
>
> $ brew install rbenv
> $ brew install ruby-build

Oh! And, don't forget to set the newly installed Ruby as your default 
Ruby version:

$ rbenv global 1.9.3-p237

or

$ rbenv local 1.9.3-p237 (from inside your Rails project folder)

-- 
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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help even generating a new app

2013-01-14 Thread Robert Walker
Josh Aronoff wrote in post #1092274:
> I'm having trouble even installing new rails apps. I get to the Bundle
> run, and it errors on Json, here's what my error says. I'm new to ALL of
> this, including Terminal commands, etc. Hope someone can help me out.
> Runs the Bundler then I error out at this:
>
>
> "Installing json (1.7.6) with native extensions
> Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
> extension.
>
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> extconf.rb
> mkmf.rb can't find header files for ruby at
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
>
>
> Gem files will remain installed in
> /Users/aronoff/.bundler/tmp/8712/gems/json-1.7.6 for inspection.
> Results logged to
> 
/Users/aronoff/.bundler/tmp/8712/gems/json-1.7.6/ext/json/ext/generator/gem_make.out
> An error occured while installing json (1.7.6), and Bundler cannot
> continue.
> Make sure that `gem install json -v '1.7.6'` succeeds before bundling."
>
> I was hoping you guys could help me.

I see from those paths that you appear to be on a Mac. Here are my 
recommendations for getting started with the latest versions of Ruby and 
Rails.

Step 1: Install Homebrew.

http://mxcl.github.com/homebrew/

Step 2: Install and configure rbenv and ruby-build using Homebrew.

$ brew install rbenv
$ brew install ruby-build

https://github.com/sstephenson/rbenv

Step 3: Install Ruby 1.9.3

$ rbenv install 1.9.3-p327

Step 4: Install Rails

$ gem install rails

Step 5: Create a new Rails app:

$ rails new my_first_app

Step 6: Profit!

-- 
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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help fixing an error populating a select box in the insert page but works in the editpage

2012-11-18 Thread rubyrookie
Thanks I have it working now.

On Saturday, November 17, 2012 9:26:54 AM UTC-8, Ruby Rooikie wrote:
>
> Two Models Country and Bank. The below form is used for insert and edit 
> page works fine .  f.collection_select works fine for edit page but throws 
> error for insert page. I think error it is trying to populate the selected 
> value in the combo box but country id is not available. Can you help me 
> fixing the issue? What is prompt used for?
>
>
>
>
> Error
>
> undefined method `map' for nil:NilClass
>
> Extracted source (around line *#23*):
>
> 20: <%= f.label :country_id %>
> 21:
> 22:  
> 23:  <%= f.collection_select :country_id, @countries, :id, :name, :prompt 
> => "Test" %>
> 24:   
> 25:   
> 26: <%= f.submit %>
>
> class Bank < ActiveRecord::Base
>   attr_accessible :name,:country_id
>   belongs_to :country
>   validates :name, :presence => true
>   
> validates_presence_of :country
> end
>
>
> class Country < ActiveRecord::Base
>   attr_accessible :name
>  end
>
> Form
>
>
>
> <%= form_for(@bank) do |f| %>
>   <% if @bank.errors.any? %>
> 
>   <%= pluralize(@bank.errors.count, "error") %> prohibited this 
> bank from being saved:
>
>   
>   <% @bank.errors.full_messages.each do |msg| %>
> <%= msg %>
>   <% end %>
>   
> 
>   <% end %>
>
>   
> <%= f.label :name %>
> <%= f.text_field :name %>
>   
>   
>   
> <%= f.label :country_id %>
> 
>  
>  <%= f.collection_select :country_id, @countries, :id, :name, :prompt 
> => "Test" %>
>  
>   
>   
> <%= f.submit %>
>   
> <% 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.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/8Ci6CeC39agJ.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: Need help fixing an error populating a select box in the insert page but works in the editpage

2012-11-18 Thread rubyrookie
Yes I am setting it up. i got it to work. :) Thanks

On Saturday, November 17, 2012 9:26:54 AM UTC-8, Ruby Rooikie wrote:
>
> Two Models Country and Bank. The below form is used for insert and edit 
> page works fine .  f.collection_select works fine for edit page but throws 
> error for insert page. I think error it is trying to populate the selected 
> value in the combo box but country id is not available. Can you help me 
> fixing the issue? What is prompt used for?
>
>
>
>
> Error
>
> undefined method `map' for nil:NilClass
>
> Extracted source (around line *#23*):
>
> 20: <%= f.label :country_id %>
> 21:
> 22:  
> 23:  <%= f.collection_select :country_id, @countries, :id, :name, :prompt 
> => "Test" %>
> 24:   
> 25:   
> 26: <%= f.submit %>
>
> class Bank < ActiveRecord::Base
>   attr_accessible :name,:country_id
>   belongs_to :country
>   validates :name, :presence => true
>   
> validates_presence_of :country
> end
>
>
> class Country < ActiveRecord::Base
>   attr_accessible :name
>  end
>
> Form
>
>
>
> <%= form_for(@bank) do |f| %>
>   <% if @bank.errors.any? %>
> 
>   <%= pluralize(@bank.errors.count, "error") %> prohibited this 
> bank from being saved:
>
>   
>   <% @bank.errors.full_messages.each do |msg| %>
> <%= msg %>
>   <% end %>
>   
> 
>   <% end %>
>
>   
> <%= f.label :name %>
> <%= f.text_field :name %>
>   
>   
>   
> <%= f.label :country_id %>
> 
>  
>  <%= f.collection_select :country_id, @countries, :id, :name, :prompt 
> => "Test" %>
>  
>   
>   
> <%= f.submit %>
>   
> <% 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.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/-BCYEFqHLdUJ.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help to implement audio recording in rails application

2012-08-26 Thread Loganathan Sellapa
Yes, I know but currently I am looking forward to integrate Red5 server
because I hope without some media servers, the application will not handle
heavy traffic. I will look into HTML 5 once I get this done.

regards,
Loganathan
ViewMe 

On Sun, Aug 26, 2012 at 3:48 PM, Dheeraj Kumar wrote:

> You could use a HTML5 solution with a Flash fallback, to be more
> future-ready.
>
>
> Dheeraj Kumar
>
> On Sunday 26 August 2012 at 3:42 PM, Loganathan Sellapa wrote:
>
> Yes, but most of the media applications are still depends on Flash only.
> It will take some sort of time to move on with HTML5.
>
> regards,
> Loganathan
> ViewMe 
>
> On Sun, Aug 26, 2012 at 3:38 PM, Gintautas Šimkus wrote:
>
> +1 for an interesting topic. But flash is going to die out, so are there
> any HTML5 alternatives for the proposed solution?
>
>
> 2012/8/26 Loganathan Sellapa 
>
> Sure, I am still searching for the tutorial to integrate red5 with ROR,
> yet I didn't find nice one,.
>
> regards,
> Loganathan
> ViewMe 
>
>
>
> On Fri, Aug 24, 2012 at 10:48 PM, Timothy Bone wrote:
>
> post it if you find more info. id also like to learn this functionality
>
>  --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/zkPPP7rqLmAJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>  --
> 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 https://groups.google.com/groups/opt_out.
>
>
>
>
>
>
> --
> Pagarbiai,
> Gintautas
>
>  --
> 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 https://groups.google.com/groups/opt_out.
>
>
>
>
>  --
> 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 https://groups.google.com/groups/opt_out.
>
>
>
>
>  --
> 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 https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help to implement audio recording in rails application

2012-08-26 Thread Dheeraj Kumar
You could use a HTML5 solution with a Flash fallback, to be more future-ready.


Dheeraj Kumar


On Sunday 26 August 2012 at 3:42 PM, Loganathan Sellapa wrote:

> Yes, but most of the media applications are still depends on Flash only. It 
> will take some sort of time to move on with HTML5.
>  
> regards,
> Loganathan
> ViewMe (http://vizualize.me/loganathan)
>  
> On Sun, Aug 26, 2012 at 3:38 PM, Gintautas Šimkus  (mailto:dihita...@gmail.com)> wrote:
> > +1 for an interesting topic. But flash is going to die out, so are there 
> > any HTML5 alternatives for the proposed solution?
> >  
> >  
> > 2012/8/26 Loganathan Sellapa  > (mailto:loganathan...@gmail.com)>
> > > Sure, I am still searching for the tutorial to integrate red5 with ROR, 
> > > yet I didn't find nice one,.
> > >  
> > > regards,
> > > Loganathan
> > > ViewMe (http://vizualize.me/loganathan)
> > >  
> > >  
> > >  
> > > On Fri, Aug 24, 2012 at 10:48 PM, Timothy Bone  > > (mailto:timothyb...@gmail.com)> wrote:
> > > > > post it if you find more info. id also like to learn this 
> > > > > functionality  
> > > >  
> > > > --  
> > > > 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 
> > > > (mailto:rubyonrails-talk@googlegroups.com).
> > > > To unsubscribe from this group, send email to 
> > > > rubyonrails-talk+unsubscr...@googlegroups.com 
> > > > (mailto:rubyonrails-talk%2bunsubscr...@googlegroups.com).
> > > > To view this discussion on the web visit 
> > > > https://groups.google.com/d/msg/rubyonrails-talk/-/zkPPP7rqLmAJ.
> > > > For more options, visit https://groups.google.com/groups/opt_out.
> > > >   
> > > >   
> > >  
> > > --  
> > > 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 
> > > (mailto:rubyonrails-talk@googlegroups.com).
> > > To unsubscribe from this group, send email to 
> > > rubyonrails-talk+unsubscr...@googlegroups.com 
> > > (mailto:rubyonrails-talk%2bunsubscr...@googlegroups.com).
> > > For more options, visit https://groups.google.com/groups/opt_out.
> > >   
> > >   
> >  
> >  
> >  
> > --  
> > Pagarbiai,
> > Gintautas
> >  
> > --  
> > 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 
> > (mailto:rubyonrails-talk@googlegroups.com).
> > To unsubscribe from this group, send email to 
> > rubyonrails-talk+unsubscr...@googlegroups.com 
> > (mailto:rubyonrails-talk%2bunsubscr...@googlegroups.com).
> > For more options, visit https://groups.google.com/groups/opt_out.
> >   
> >   
>  
> --  
> 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 
> (mailto:rubyonrails-talk@googlegroups.com).
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com 
> (mailto:rubyonrails-talk+unsubscr...@googlegroups.com).
> For more options, visit https://groups.google.com/groups/opt_out.
>   
>   

-- 
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 https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help to implement audio recording in rails application

2012-08-26 Thread Loganathan Sellapa
Yes, but most of the media applications are still depends on Flash only. It
will take some sort of time to move on with HTML5.

regards,
Loganathan
ViewMe 

On Sun, Aug 26, 2012 at 3:38 PM, Gintautas Šimkus wrote:

> +1 for an interesting topic. But flash is going to die out, so are there
> any HTML5 alternatives for the proposed solution?
>
>
> 2012/8/26 Loganathan Sellapa 
>
>> Sure, I am still searching for the tutorial to integrate red5 with ROR,
>> yet I didn't find nice one,.
>>
>> regards,
>> Loganathan
>> ViewMe 
>>
>>
>>
>> On Fri, Aug 24, 2012 at 10:48 PM, Timothy Bone wrote:
>>
>>> post it if you find more info. id also like to learn this functionality
>>>
>>>  --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msg/rubyonrails-talk/-/zkPPP7rqLmAJ.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> 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 https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Pagarbiai,
> Gintautas
>
>  --
> 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 https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help to implement audio recording in rails application

2012-08-26 Thread Gintautas Šimkus
+1 for an interesting topic. But flash is going to die out, so are there
any HTML5 alternatives for the proposed solution?

2012/8/26 Loganathan Sellapa 

> Sure, I am still searching for the tutorial to integrate red5 with ROR,
> yet I didn't find nice one,.
>
> regards,
> Loganathan
> ViewMe 
>
>
>
> On Fri, Aug 24, 2012 at 10:48 PM, Timothy Bone wrote:
>
>> post it if you find more info. id also like to learn this functionality
>>
>>  --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/rubyonrails-talk/-/zkPPP7rqLmAJ.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> 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 https://groups.google.com/groups/opt_out.
>
>
>



-- 
Pagarbiai,
Gintautas

-- 
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 https://groups.google.com/groups/opt_out.




Re: [Rails] Re: Need help to implement audio recording in rails application

2012-08-26 Thread Loganathan Sellapa
Sure, I am still searching for the tutorial to integrate red5 with ROR, yet
I didn't find nice one,.

regards,
Loganathan
ViewMe 


On Fri, Aug 24, 2012 at 10:48 PM, Timothy Bone wrote:

> post it if you find more info. id also like to learn this functionality
>
>  --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/zkPPP7rqLmAJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 https://groups.google.com/groups/opt_out.




[Rails] Re: Need help to implement audio recording in rails application

2012-08-26 Thread Timothy Bone

>
> post it if you find more info. id also like to learn this functionality 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/zkPPP7rqLmAJ.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Re: Need help with routing problem

2012-02-23 Thread simpleton
Hi Ryan

I've solved this. I had to remove the matched routes from the
devise_for block and I had a get '/dashboard/index' on top of my
routes file.

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: Need help in copying public key for a new user to EC2

2011-12-09 Thread Frederick Cheung


On Dec 9, 11:48 pm, Geo Manickam  wrote:
> Need help for uploading a public key for a new EC2 (AMI) user to tmp
> folder. Any help on this appreciated.
>
> Follow the stepshttp://aws.amazon.com/articles/1233i.e not able to
> pass this step "Copy all the public key files that you generated to a
> temporary place on your instance:"
>
> Steps:
>
> 1. SSH into my EC2 instance and logged in as su
>  2. Created a user "geoman" and with a password.
>  3. Now in my mac notebook in the shell created a private and public
> key for the user ssh-keygen -b 1024 -f geoman -t dsa
>  4. Now try to copy the geoman.pub file using the commands
> 4.1 command : scp -v -i amazon-ec2-ticket-ws-key-pair.pem geoman.pub
> r...@ec2-xx-xxx-x-xx.us-west-2.compute.amazonaws.com:/tmp/geoman.pub
> 4.2 command : scp -v -i amazon-ec2-ticket-ws-key-pair.pem geoman.pub
> ec2-u...@ec2-xx-xxx-x-xx.us-west-2.compute.amazonaws.com:/tmp/
> geoman.pub

If you're using the default amazon linux image, you won't be able to
scp in as root - root has remote access disabled. You need to sep in
using whatever user/credentials you used in 1. That article looks a
little out of date. If you're using the aforementioned linux image
(it's the default) then most of what it describes is already setup for
you. Lastly this isn't really anything to do with rails - there are
probably more suitable areas for discussing this (e.g. the official
aws forum, which has a bunch of amazon employees contributing)

Fred


>
> Result:
>
> Permission denied (publickey).
>  lost connection
>
> Shell Output:
>
> OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
>  debug1: Reading configuration data /etc/ssh_config
>  debug1: Applying options for *
>  debug1: Connecting to 
> ec2-50-112-3-25.us-west-2.compute.amazonaws.comhttp://50.112.3.25port 22.
>  debug1: Connection established.
>  debug1: identity file amazon-ec2-ticket-ws-key-pair.pem type -1
>  debug1: identity file amazon-ec2-ticket-ws-key-pair.pem-cert type -1
>  debug1: Remote protocol version 2.0, remote software version
> OpenSSH_5.3
>  debug1: match: OpenSSH_5.3 pat OpenSSH*
>  debug1: Enabling compatibility mode for protocol 2.0
>  debug1: Local version string SSH-2.0-OpenSSH_5.6
>  debug1: SSH2_MSG_KEXINIT sent
>  debug1: SSH2_MSG_KEXINIT received
>  debug1: kex: server->client aes128-ctr hmac-md5 none
>  debug1: kex: client->server aes128-ctr hmac-md5 none
>  debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
>  debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
>  debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
>  debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
>  debug1: Host 'ec2-50-112-3-25.us-west-2.compute.amazonaws.com' is
> known and matches the RSA host key.
>  debug1: Found key in /Users/geoman/.ssh/known_hosts:9
>  debug1: ssh_rsa_verify: signature correct
>  debug1: SSH2_MSG_NEWKEYS sent
>  debug1: expecting SSH2_MSG_NEWKEYS
>  debug1: SSH2_MSG_NEWKEYS received
>  debug1: Roaming not allowed by server
>  debug1: SSH2_MSG_SERVICE_REQUEST sent
>  debug1: SSH2_MSG_SERVICE_ACCEPT received
>  debug1: Authentications that can continue: publickey
>  debug1: Next authentication method: publickey
>  debug1: Offering RSA public key: /Users/geoman/.ssh/id_rsa
>  debug1: Authentications that can continue: publickey
>  debug1: Trying private key: amazon-ec2-ticket-ws-key-pair.pem
>  debug1: read PEM private key done: type RSA
>  debug1: Authentications that can continue: publickey
>  debug1: No more authentication methods to try.
>  Permission denied (publickey).
>  lost connection

-- 
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: Need help with WePay integration using oAuth

2011-12-08 Thread Adam M.
Qas Wm wrote in post #1008599:
> Hi,
>
> I a trying to integrate WePay with oauth but I have next to nothing
> experience with oauth and need help and guidance in completing this
> task.
>
> Does anyone have any pointer or sample they can direct me to?

Checkout the wepay-rails gem: 
https://github.com/adamthedeveloper/wepay-rails
It handles the Oauth and IPN calls for you.

-- 
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: need help with an awkard error

2011-06-07 Thread Jeweller

Thanks Colin and Fred,it works with<%= comment.commenter.name if
comment.commenter %>
I still don't understand why some of the commenters are nil, but I
will take your advise and learn how to debug myself.
Thanks very much!!

On 6月7日, 下午7时28分, Colin Law  wrote:
> 2011/6/7 Jeweller :
>
> > Well, I think Fred may be right. The path to my app contains some
> > Chinese, like "桌面". So I removed it to another directory, but there
> > came with a new error "undefined method `name' for nil:NilClass"
> > instead of the old one.
>
> As I asked previously, don't top post.  Thanks.
>
>
>
> > comment.commenter is a nilclass !!!    but <%= comment.commenter %> it
> > got #
>
> I think you must be mistaken, it cannot both be nil and User at the
> same time.  As fred suggested, maybe some are ok and others are nil.
> Try using something like
> <%= comment.commenter.name if comment.commenter %>
> Also have a look at the Rails Guide on debugging.  It will show you
> how to use ruby-debug to break into your code and inspect data and
> follow flow.
>
> 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: need help with an awkard error

2011-06-07 Thread Colin Law
2011/6/7 Jeweller :
> Well, I think Fred may be right. The path to my app contains some
> Chinese, like "桌面". So I removed it to another directory, but there
> came with a new error "undefined method `name' for nil:NilClass"
> instead of the old one.

As I asked previously, don't top post.  Thanks.

>
> comment.commenter is a nilclass !!!    but <%= comment.commenter %> it
> got #

I think you must be mistaken, it cannot both be nil and User at the
same time.  As fred suggested, maybe some are ok and others are nil.
Try using something like
<%= comment.commenter.name if comment.commenter %>
Also have a look at the Rails Guide on debugging.  It will show you
how to use ruby-debug to break into your code and inspect data and
follow flow.

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: need help with an awkard error

2011-06-07 Thread Jeweller
Well, I think Fred may be right. The path to my app contains some
Chinese, like "桌面". So I removed it to another directory, but there
came with a new error "undefined method `name' for nil:NilClass"
instead of the old one.

comment.commenter is a nilclass !!!but <%= comment.commenter %> it
got #

here is the model,there may be some problem.

class User < ActiveRecord::Base
  has_many :comments, :dependent => :destory
  #...
end

class Comment < ActiveRecord::Base
  belongs_to :commentable, :polymorphic => true
  belongs_to :micropost
  belongs_to :commenter, :class_name => "User", :foreign_key =>
"commenter_id"
  has_many :comments, :as => :commentable, :dependent => :destroy
# A comment can also be commented
  #...
end

On 6月7日, 下午5时06分, Colin Law  wrote:
> 2011/6/7 Jeweller :
>
> Could you not top post please, insert your reply at appropriate points
> in the previous post, that makes it easier to follow the thread.
>
> > Sorry, I don't know how to test it. I'm new to Rails. Could you
> > specify it?
> > Or let's say if you want a user able to comment on microposts and also
> > comments, what would you do?
> > I just don't want to use "act_as_commentable" gem, because I'm trying
> > to learn
>
> I think Frederick is suggesting that there may be some unusual
> characters in the path to your app that is causing the unusual error
> messages.  What is the path to the app (something like
> /home/jeweller/myapp for example)?
>
> If there are such characters then the easy test to see if this is the
> problem is to copy the entire app to a different location and run it
> there (or just rename folders to ascii text).
>
> Colin
>
>
>
>
>
> > On 6月7日, 下午2时50分, Frederick Cheung  wrote:
> >> On Jun 7, 3:37 am, Jeweller  wrote:
>
> >> > thanks ,Fred.
> >> >  I still don't understand,because in the model I use the
> >> > "validates_presense_of :commenter" to make sure the commenter
> >> > won't be nil.
> >> > Here's the file I used to generate sample data.
>
> >> > require 'faker'
> >> > def make_comments
> >> >   Micropost.all.each do |micropost|
> >> > User.all(:limit => 2).each do |user|
> >> >   micropost.comments.create!(:content =>
> >> > Faker::Lorem.sentence(4), :commenter => user)
> >> > end
> >> >   end
> >> > end
>
> >> > Now, every micropost has two comments, and the commenters are the
> >> > first,and the second one in the database.
>
> >> > In your opinon, what may brings to the situation ---" the path to your
> >> > rails app contain some non ASCII characters"
>
> >> I don't think it's related to the actual problem in your app but I do
> >> think it could be triggering a bug in the backtrace cleaner stuff in
> >> rails, which is obscuring the actual error you get. Should be easy
> >> enough to test this hypothesis
>
> >> Fred
>
> >> > On 6月7日, 上午2时29分, Frederick Cheung  wrote:
>
> >> > > On Jun 6, 4:34 pm, Jeweller  wrote:
>
> >> > > > so I placed this line in the home.html.erb  to test
> >> > > > <%= @feed_items.first.comments.first.commenter.name %>
> >> > > > it's worked!
>
> >> > > > I'm very confused. I mean what's the difference between these two
> >> > > > ways?  And also the error message, it's very strange. because I've
> >> > > > specified utf-8 encoding in the database.yml
>
> >> > > Well the main difference is that this is only displaying a single
> >> > > name. If for example there is a comment where comment.commenter is nil
> >> > > then calling .name on it would raise an error but your second example
> >> > > would be ok unless the bad comment happens to be the first comment of
> >> > > the first item.
>
> >> > > I think the actual error message you get is something unrelated
> >> > > happening during the process of preparing the error page. Does the
> >> > > path to your rails app contain some non ASCII characters perhaps?
>
> >> > > 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 
> > 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.



Re: [Rails] Re: need help with an awkard error

2011-06-07 Thread Colin Law
2011/6/7 Jeweller :

Could you not top post please, insert your reply at appropriate points
in the previous post, that makes it easier to follow the thread.

> Sorry, I don't know how to test it. I'm new to Rails. Could you
> specify it?
> Or let's say if you want a user able to comment on microposts and also
> comments, what would you do?
> I just don't want to use "act_as_commentable" gem, because I'm trying
> to learn

I think Frederick is suggesting that there may be some unusual
characters in the path to your app that is causing the unusual error
messages.  What is the path to the app (something like
/home/jeweller/myapp for example)?

If there are such characters then the easy test to see if this is the
problem is to copy the entire app to a different location and run it
there (or just rename folders to ascii text).

Colin

>
> On 6月7日, 下午2时50分, Frederick Cheung  wrote:
>> On Jun 7, 3:37 am, Jeweller  wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > thanks ,Fred.
>> >  I still don't understand,because in the model I use the
>> > "validates_presense_of :commenter" to make sure the commenter
>> > won't be nil.
>> > Here's the file I used to generate sample data.
>>
>> > require 'faker'
>> > def make_comments
>> >   Micropost.all.each do |micropost|
>> > User.all(:limit => 2).each do |user|
>> >   micropost.comments.create!(:content =>
>> > Faker::Lorem.sentence(4), :commenter => user)
>> > end
>> >   end
>> > end
>>
>> > Now, every micropost has two comments, and the commenters are the
>> > first,and the second one in the database.
>>
>> > In your opinon, what may brings to the situation ---" the path to your
>> > rails app contain some non ASCII characters"
>>
>> I don't think it's related to the actual problem in your app but I do
>> think it could be triggering a bug in the backtrace cleaner stuff in
>> rails, which is obscuring the actual error you get. Should be easy
>> enough to test this hypothesis
>>
>> Fred
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > On 6月7日, 上午2时29分, Frederick Cheung  wrote:
>>
>> > > On Jun 6, 4:34 pm, Jeweller  wrote:
>>
>> > > > so I placed this line in the home.html.erb  to test
>> > > > <%= @feed_items.first.comments.first.commenter.name %>
>> > > > it's worked!
>>
>> > > > I'm very confused. I mean what's the difference between these two
>> > > > ways?  And also the error message, it's very strange. because I've
>> > > > specified utf-8 encoding in the database.yml
>>
>> > > Well the main difference is that this is only displaying a single
>> > > name. If for example there is a comment where comment.commenter is nil
>> > > then calling .name on it would raise an error but your second example
>> > > would be ok unless the bad comment happens to be the first comment of
>> > > the first item.
>>
>> > > I think the actual error message you get is something unrelated
>> > > happening during the process of preparing the error page. Does the
>> > > path to your rails app contain some non ASCII characters perhaps?
>>
>> > > 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.
>
>

-- 
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: need help with an awkard error

2011-06-07 Thread Jeweller
Sorry, I don't know how to test it. I'm new to Rails. Could you
specify it?
Or let's say if you want a user able to comment on microposts and also
comments, what would you do?
I just don't want to use "act_as_commentable" gem, because I'm trying
to learn

On 6月7日, 下午2时50分, Frederick Cheung  wrote:
> On Jun 7, 3:37 am, Jeweller  wrote:
>
>
>
>
>
>
>
>
>
> > thanks ,Fred.
> >  I still don't understand,because in the model I use the
> > "validates_presense_of :commenter" to make sure the commenter
> > won't be nil.
> > Here's the file I used to generate sample data.
>
> > require 'faker'
> > def make_comments
> >   Micropost.all.each do |micropost|
> > User.all(:limit => 2).each do |user|
> >   micropost.comments.create!(:content =>
> > Faker::Lorem.sentence(4), :commenter => user)
> > end
> >   end
> > end
>
> > Now, every micropost has two comments, and the commenters are the
> > first,and the second one in the database.
>
> > In your opinon, what may brings to the situation ---" the path to your
> > rails app contain some non ASCII characters"
>
> I don't think it's related to the actual problem in your app but I do
> think it could be triggering a bug in the backtrace cleaner stuff in
> rails, which is obscuring the actual error you get. Should be easy
> enough to test this hypothesis
>
> Fred
>
>
>
>
>
>
>
>
>
> > On 6月7日, 上午2时29分, Frederick Cheung  wrote:
>
> > > On Jun 6, 4:34 pm, Jeweller  wrote:
>
> > > > so I placed this line in the home.html.erb  to test
> > > > <%= @feed_items.first.comments.first.commenter.name %>
> > > > it's worked!
>
> > > > I'm very confused. I mean what's the difference between these two
> > > > ways?  And also the error message, it's very strange. because I've
> > > > specified utf-8 encoding in the database.yml
>
> > > Well the main difference is that this is only displaying a single
> > > name. If for example there is a comment where comment.commenter is nil
> > > then calling .name on it would raise an error but your second example
> > > would be ok unless the bad comment happens to be the first comment of
> > > the first item.
>
> > > I think the actual error message you get is something unrelated
> > > happening during the process of preparing the error page. Does the
> > > path to your rails app contain some non ASCII characters perhaps?
>
> > > 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.



[Rails] Re: need help with an awkard error

2011-06-06 Thread Frederick Cheung


On Jun 7, 3:37 am, Jeweller  wrote:
> thanks ,Fred.
>  I still don't understand,because in the model I use the
> "validates_presense_of :commenter" to make sure the commenter
> won't be nil.
> Here's the file I used to generate sample data.
>
> require 'faker'
> def make_comments
>   Micropost.all.each do |micropost|
> User.all(:limit => 2).each do |user|
>   micropost.comments.create!(:content =>
> Faker::Lorem.sentence(4), :commenter => user)
> end
>   end
> end
>
> Now, every micropost has two comments, and the commenters are the
> first,and the second one in the database.
>
> In your opinon, what may brings to the situation ---" the path to your
> rails app contain some non ASCII characters"

I don't think it's related to the actual problem in your app but I do
think it could be triggering a bug in the backtrace cleaner stuff in
rails, which is obscuring the actual error you get. Should be easy
enough to test this hypothesis

Fred
>
> On 6月7日, 上午2时29分, Frederick Cheung  wrote:
>
>
>
> > On Jun 6, 4:34 pm, Jeweller  wrote:
>
> > > so I placed this line in the home.html.erb  to test
> > > <%= @feed_items.first.comments.first.commenter.name %>
> > > it's worked!
>
> > > I'm very confused. I mean what's the difference between these two
> > > ways?  And also the error message, it's very strange. because I've
> > > specified utf-8 encoding in the database.yml
>
> > Well the main difference is that this is only displaying a single
> > name. If for example there is a comment where comment.commenter is nil
> > then calling .name on it would raise an error but your second example
> > would be ok unless the bad comment happens to be the first comment of
> > the first item.
>
> > I think the actual error message you get is something unrelated
> > happening during the process of preparing the error page. Does the
> > path to your rails app contain some non ASCII characters perhaps?
>
> > 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.



[Rails] Re: need help with an awkard error

2011-06-06 Thread Jeweller
thanks ,Fred.
 I still don't understand,because in the model I use the
"validates_presense_of :commenter" to make sure the commenter
won't be nil.
Here's the file I used to generate sample data.

require 'faker'
def make_comments
  Micropost.all.each do |micropost|
User.all(:limit => 2).each do |user|
  micropost.comments.create!(:content =>
Faker::Lorem.sentence(4), :commenter => user)
end
  end
end

Now, every micropost has two comments, and the commenters are the
first,and the second one in the database.

In your opinon, what may brings to the situation ---" the path to your
rails app contain some non ASCII characters"

On 6月7日, 上午2时29分, Frederick Cheung  wrote:
> On Jun 6, 4:34 pm, Jeweller  wrote:
>
>
>
> > so I placed this line in the home.html.erb  to test
> > <%= @feed_items.first.comments.first.commenter.name %>
> > it's worked!
>
> > I'm very confused. I mean what's the difference between these two
> > ways?  And also the error message, it's very strange. because I've
> > specified utf-8 encoding in the database.yml
>
> Well the main difference is that this is only displaying a single
> name. If for example there is a comment where comment.commenter is nil
> then calling .name on it would raise an error but your second example
> would be ok unless the bad comment happens to be the first comment of
> the first item.
>
> I think the actual error message you get is something unrelated
> happening during the process of preparing the error page. Does the
> path to your rails app contain some non ASCII characters perhaps?
>
> 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.



[Rails] Re: need help with an awkard error

2011-06-06 Thread Frederick Cheung


On Jun 6, 4:34 pm, Jeweller  wrote:
>
>
> so I placed this line in the home.html.erb  to test
> <%= @feed_items.first.comments.first.commenter.name %>
> it's worked!
>
> I'm very confused. I mean what's the difference between these two
> ways?  And also the error message, it's very strange. because I've
> specified utf-8 encoding in the database.yml

Well the main difference is that this is only displaying a single
name. If for example there is a comment where comment.commenter is nil
then calling .name on it would raise an error but your second example
would be ok unless the bad comment happens to be the first comment of
the first item.

I think the actual error message you get is something unrelated
happening during the process of preparing the error page. Does the
path to your rails app contain some non ASCII characters perhaps?

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.



[Rails] Re: need help with oracle adapter

2011-04-12 Thread fAisAl
Thank you for you help Bryan, I am very satisfied by our answer.
I will try to tell my host that to upgrade their environment.

Thank for all who tried to help and also thanks for Fred for early
answer.

Cheers all,
Faisal

On Apr 10, 12:25 am, Bryan Crossland  wrote:
> On Sat, Apr 9, 2011 at 2:07 AM, fAisAl  wrote:
> > Thank you Fred for your suggestion. I might leave that at end when no
> > other available solutions.
>
> activerecord-oracle-adapter's last official version of Rails it worked with
> was Rails 2 (2.1 if I recall correctly). It was replaced years ago
> by activerecord-oracle_enhanced-adapter which works with Rails 2.3.* and
> Rails 3. If you wish to use the older adapter you are going to have to use
> an earlier version of Rails 2. I would suggest you tell your host to get
> with the times and install activerecord-oracle_enhanced-adapter. If they
> refuse then you are stuck with having to use an older version of Rails 2. At
> that point I would seriously consider switching hosting providers.
>
> 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] Re: need help with oracle adapter

2011-04-09 Thread Bryan Crossland
On Sat, Apr 9, 2011 at 2:07 AM, fAisAl  wrote:

> Thank you Fred for your suggestion. I might leave that at end when no
> other available solutions.
>
>
activerecord-oracle-adapter's last official version of Rails it worked with
was Rails 2 (2.1 if I recall correctly). It was replaced years ago
by activerecord-oracle_enhanced-adapter which works with Rails 2.3.* and
Rails 3. If you wish to use the older adapter you are going to have to use
an earlier version of Rails 2. I would suggest you tell your host to get
with the times and install activerecord-oracle_enhanced-adapter. If they
refuse then you are stuck with having to use an older version of Rails 2. At
that point I would seriously consider switching hosting providers.

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: need help with oracle adapter

2011-04-09 Thread fAisAl
Thank you Fred for your suggestion. I might leave that at end when no
other available solutions.

Faisal

On Apr 9, 3:44 pm, Frederick Cheung 
wrote:
> On 9 Apr 2011, at 07:19, fAisAl  wrote:
>
> > Thank you Fred,
> > Yes I could have used that, but as a requirement from host, I must use
> > the old adapter not the enhanced one.
>
> You'll probably need to use an older version of rails (ie 2.x) then
>
> Fred
>
>
>
> > Cheers,
> > Faisal
>
> > On Apr 9, 3:13 pm, Frederick Cheung 
> > wrote:
> >> On 9 Apr 2011, at 03:11, fAisAl  wrote:
>
> >>> Hi all,
> >>> I have been struggling with this problem for a while.
> >>> I cannot insert into a table  (simple action) with auto-increment
> >>> mechanism.
>
> >>> I have got:
> >>> rvm with ruby 1.8.7
> >>> gem -v is: 1.6.2
> >>> rails -v is" 3.0.5
> >>> ruby-oci8 1.0.6
> >>> activerecord-oracle-adapter, not the enhanced one,
> >>> the version I used is 1.0.0.9250.
>
> >> Have you tried the enhanced one? I seem to recall that is the actively 
> >> maintained one.
>
> >> Fred
>
> >>> all above versions are required.
>
> >>> I created a table " programs" with primary key id.
> >>> I also created a sequence for auto-increment. : programs_seq
> >>> I also created a trigger before insert into that table:
> >>> programs_trigger
>
> >>> The table name is programs, therefore, the model name is program
>
> >>> class Program < ActiveRecord::Base
> >>>  set_primary_key "id"
> >>>  set_sequence_name "programs_seq"
> >>> end
>
> >>> when i try to insert into that table via sqlplus is works, but when I
> >>> use rails console I could not, it gives me along errors or exceptions
> >>> with primary key,
>
> >>> First part of the errors:
> >>> NoMethodError: undefined method `primary_key' for
> >>> # 
>
> >>> It is very long message, sorry about that.
>
> >>> Please help, I searched for a solution but with no luck.
> >>> any help will be appreciated.
>
> >>> Cheers,
> >>> Faisal
>
> >>> --
> >>> 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 
> > 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.



Re: [Rails] Re: need help with oracle adapter

2011-04-08 Thread Frederick Cheung


On 9 Apr 2011, at 07:19, fAisAl  wrote:

> Thank you Fred,
> Yes I could have used that, but as a requirement from host, I must use
> the old adapter not the enhanced one.

You'll probably need to use an older version of rails (ie 2.x) then

Fred
> 
> Cheers,
> Faisal
> 
> On Apr 9, 3:13 pm, Frederick Cheung 
> wrote:
>> On 9 Apr 2011, at 03:11, fAisAl  wrote:
>> 
>>> Hi all,
>>> I have been struggling with this problem for a while.
>>> I cannot insert into a table  (simple action) with auto-increment
>>> mechanism.
>> 
>>> I have got:
>>> rvm with ruby 1.8.7
>>> gem -v is: 1.6.2
>>> rails -v is" 3.0.5
>>> ruby-oci8 1.0.6
>>> activerecord-oracle-adapter, not the enhanced one,
>>> the version I used is 1.0.0.9250.
>> 
>> Have you tried the enhanced one? I seem to recall that is the actively 
>> maintained one.
>> 
>> Fred
>> 
>>> all above versions are required.
>> 
>>> I created a table " programs" with primary key id.
>>> I also created a sequence for auto-increment. : programs_seq
>>> I also created a trigger before insert into that table:
>>> programs_trigger
>> 
>>> The table name is programs, therefore, the model name is program
>> 
>>> class Program < ActiveRecord::Base
>>>  set_primary_key "id"
>>>  set_sequence_name "programs_seq"
>>> end
>> 
>>> when i try to insert into that table via sqlplus is works, but when I
>>> use rails console I could not, it gives me along errors or exceptions
>>> with primary key,
>> 
>>> First part of the errors:
>>> NoMethodError: undefined method `primary_key' for
>>> # 
>> 
>>> It is very long message, sorry about that.
>> 
>>> Please help, I searched for a solution but with no luck.
>>> any help will be appreciated.
>> 
>>> Cheers,
>>> Faisal
>> 
>>> --
>>> 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.
> 

-- 
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: need help with oracle adapter

2011-04-08 Thread fAisAl
Thank you Fred,
Yes I could have used that, but as a requirement from host, I must use
the old adapter not the enhanced one.

Cheers,
Faisal

On Apr 9, 3:13 pm, Frederick Cheung 
wrote:
> On 9 Apr 2011, at 03:11, fAisAl  wrote:
>
> > Hi all,
> > I have been struggling with this problem for a while.
> > I cannot insert into a table  (simple action) with auto-increment
> > mechanism.
>
> > I have got:
> > rvm with ruby 1.8.7
> > gem -v is: 1.6.2
> > rails -v is" 3.0.5
> > ruby-oci8 1.0.6
> > activerecord-oracle-adapter, not the enhanced one,
> > the version I used is 1.0.0.9250.
>
> Have you tried the enhanced one? I seem to recall that is the actively 
> maintained one.
>
> Fred
>
> > all above versions are required.
>
> > I created a table " programs" with primary key id.
> > I also created a sequence for auto-increment. : programs_seq
> > I also created a trigger before insert into that table:
> > programs_trigger
>
> > The table name is programs, therefore, the model name is program
>
> > class Program < ActiveRecord::Base
> >  set_primary_key "id"
> >  set_sequence_name "programs_seq"
> > end
>
> > when i try to insert into that table via sqlplus is works, but when I
> > use rails console I could not, it gives me along errors or exceptions
> > with primary key,
>
> > First part of the errors:
> > NoMethodError: undefined method `primary_key' for
> > # 
>
> > It is very long message, sorry about that.
>
> > Please help, I searched for a solution but with no luck.
> > any help will be appreciated.
>
> > Cheers,
> > Faisal
>
> > --
> > 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] Re: Need help in changing data in production.

2011-04-08 Thread Peter
On Apr 8, 2:21 am, Marco Antonio Filho  wrote:
>
> I do agree with you. But I read so many articles that state that the
> migrations are supposed only to contain the structure of the tables, not
> changes in the records.
>

I get confused sometimes too, but what helps me is to think about it
this way: if you are moving data to conform to a new schema, then it
is really part of the schema change and ergo belongs in a migration.
However, if you are changing data for some other purpose (for example
requiring everyone to reset their password on next login after some
security issue), then that would belong in something more of a rake/
capistrano task since its not schema related.

I believe when people saying migrations shouldn't change the records,
they mean outside of changes required by schema changes, which are
what the migrations are supposed to address.

My 2c,
\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.



Re: [Rails] Re: Need help in changing data in production.

2011-04-08 Thread Marco Antonio Filho
On Thu, Apr 7, 2011 at 4:02 PM, Ar Chron  wrote:

> Marco Antonio Filho wrote in post #991464:
> > Now comes the problem. I need to deploy these
> > changes
> > in the production servers. I already have the script to update the
> > changes,
> > but I don't know what is the conventional place to put it. Not in the
> > migrations, I know.
>
> Why not a migration?  Seems like the correct place for a one-shot
> change.
>
> Create the new table.
> Migrate the data.
> Once and done.


I do agree with you. But I read so many articles that state that the
migrations are supposed only to contain the structure of the tables, not
changes in the records.

I think I will stick with the migration then. It seems the best place to put
these scripts for now.

-- 
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: Need help in changing data in production.

2011-04-07 Thread Ar Chron
Marco Antonio Filho wrote in post #991464:
> Now comes the problem. I need to deploy these
> changes
> in the production servers. I already have the script to update the
> changes,
> but I don't know what is the conventional place to put it. Not in the
> migrations, I know.

Why not a migration?  Seems like the correct place for a one-shot 
change.

Create the new table.
Migrate the data.
Once and done.

I've done this numerous times on a project as the design evolves (create 
new table(s), reorganize existing data), and the migrations provide the 
audit trail of the actions.

Just make sure your down action undoes everything appropriately, but 
that's what your dev environment is for, isn't 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.



Re: [Rails] Re: Need help not able to run rails server 2.1.0

2011-03-07 Thread Colin Law
On 7 March 2011 19:53, korssane korssane  wrote:
> Frederick Cheung wrote in post #986018:
>> On 7 Mar 2011, at 03:57, korssane korssane  wrote:
>>
>>> message : i even tried to force but no way
>>>
>>> app/controllers/application.rb:5: undefined method `init_gettex' for
>>> ApplicationController:Class
>>
>> That mostly sounds like someone has typoed init_gettext
>>
>> Fred
>
> hi Fred,
>  what i am supposed to do ?

I think the suggestion is that line 5 of application.rb that has
init_gettex
on it, should be
init_gettext
In an earlier post you showed this line commented out (with #) but
presumably the error does not appear if it is commented out, likely a
different error appears.

I believe you say that the app is working on a different server, check
the line there to see what it is.  I trust you are picking the source
up from a source control system (git for example) in which case you
should be able to see whether you have accidentally modified that
line.  If the source is not in a version control system then get that
set up before you do anything and check into the VCS the version that
is running on the server.  Then check it out onto your system.  Do not
start editing it until you have got a VCS setup.  That is my advice
anyway.

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: Need help not able to run rails server 2.1.0

2011-03-07 Thread korssane korssane
Frederick Cheung wrote in post #986018:
> On 7 Mar 2011, at 03:57, korssane korssane  wrote:
>
>> message : i even tried to force but no way
>>
>> app/controllers/application.rb:5: undefined method `init_gettex' for
>> ApplicationController:Class
>
> That mostly sounds like someone has typoed init_gettext
>
> Fred

hi Fred,
 what i am supposed to do ?


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] Re: Need help not able to run rails server 2.1.0

2011-03-07 Thread korssane korssane
hi ,
 thanks for the quick reply .

1)
line 5 has the following :

#init_gettex "text_domain"

2)
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:

def call(*args, &block)
evaluate_method(method, *args, &block) if 
should_run_callback?(*args)
  rescue LocalJumpError

3)
line 19 of config/environment.rb?

# I18n
15:require 'gettext/rails'

17:require 'calendar_date_select'

19:Rails::Initializer.run do |config|

-- 
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: Need help in Installing Rails 3.0.3

2011-02-02 Thread elitalon
It seems the problem is already solved, as noted in the external
source: http://permalink.gmane.org/gmane.comp.lang.ruby.rails/264228

It was a network problem.

On 2 feb, 05:35, Mirage2008  wrote:
> Actually it wasn't trivial.  It helped me :0)
>
> After the RubyGem/Bundler update mess yesterday, I was afraid there
> was yet another problem with my set up.  Turns out my Time Machine's 5
> GHz network was insanely unstable and caused the error. If it weren't
> for your post, I would have spent hours searching for the problem (as
> I'm a Rails newbie).  A big thank you to you Mr. Melzer is in order,
> so "Thank you!"
>
> On Jan 25, 4:56 am, Norbert Melzer  wrote:
>
>
>
>
>
>
>
> > I know that sounds trivial, and the thread is two weeks old, but are you
> > sure you are connected to the Internet during that tests? It took me
> > yesterday 2 hours to find that problem on my local staging environment. Due
> > to configuration problems I could connect via ssh and remote control, but my
> > network did not route requests from the staging to the Internet, the just
> > got lost.

-- 
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: Need help in Installing Rails 3.0.3

2011-02-01 Thread Mirage2008
Actually it wasn't trivial.  It helped me :0)

After the RubyGem/Bundler update mess yesterday, I was afraid there
was yet another problem with my set up.  Turns out my Time Machine's 5
GHz network was insanely unstable and caused the error. If it weren't
for your post, I would have spent hours searching for the problem (as
I'm a Rails newbie).  A big thank you to you Mr. Melzer is in order,
so "Thank you!"

On Jan 25, 4:56 am, Norbert Melzer  wrote:
> I know that sounds trivial, and the thread is two weeks old, but are you
> sure you are connected to the Internet during that tests? It took me
> yesterday 2 hours to find that problem on my local staging environment. Due
> to configuration problems I could connect via ssh and remote control, but my
> network did not route requests from the staging to the Internet, the just
> got lost.

-- 
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: need help on rails route

2011-01-30 Thread justinbaker
Is it in [rails_root]/public/blog?
I would recommend reading this 
http://codelikezell.com/deploying-wordpress-with-rails-on-passenger.
It should be exactly what you're looking for.

On Jan 29, 4:23 am, nicolas  wrote:
> Hi Everyone
>
> I have a site that it is up and running. Now i need to include the
> Blog feeds to that site. So i Install Word Press on my [rails_root]/
> public.
>
> When i try to access the blog through my site it gives the route error
> (No route matches "/blog/" with {:method=>:get})
>
> Any idea???
>
> - nicolas -

-- 
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: Need help in Installing Rails 3.0.3

2011-01-25 Thread Norbert Melzer
I know that sounds trivial, and the thread is two weeks old, but are you
sure you are connected to the Internet during that tests? It took me
yesterday 2 hours to find that problem on my local staging environment. Due
to configuration problems I could connect via ssh and remote control, but my
network did not route requests from the staging to the Internet, the just
got lost.

-- 
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: Need help in Installing Rails 3.0.3

2011-01-09 Thread Hassan Schroeder
On Sun, Jan 9, 2011 at 4:28 PM, djangst  wrote:

> rubygems.org is (again) the definitive source:
>
> http://update.gemcutter.org/2010/02/20/rubygems-org-move-complete.html

Ah, crap. Guess I missed that memo  :-)

Never mind, then, and sorry for the noise.

-- 
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-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.



[Rails] Re: Need help in Installing Rails 3.0.3

2011-01-09 Thread djangst
Hassan,

rubygems.org is (again) the definitive source:

http://update.gemcutter.org/2010/02/20/rubygems-org-move-complete.html

gemcutter.org redirects to rubygems.org.

On Jan 9, 7:01 pm, Hassan Schroeder 
wrote:
> The reference to  rubygems.org is out of date.

-- 
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.



[Rails] Re: Need help with Rails form creation

2010-12-14 Thread Marnen Laibow-Koser
moroshko wrote in post #968250:
> I have the following models:
>
> Product: name, shop_id (foreign key)
> Shop:name
>
> The associations are:
>
> Product: belongs_to :shop
> Shop:has_many   :products
>
> In the form that creates a new Product I have:
>
> <%= f.label(:shop, "Shop:") %>
> <%= f.select(...) %>
>
> This is a select box with all existing shops. The last option in this
> select box is "Create New Shop". When user clicks this option,
> Javascript shows an extra field:
>
> 
> New shop:
> 
> 
>
> (This "div" is hidden by default with "display: none".)
>
> How should I add this "div" in the Rails form creation ?

Just put it in as HTML.  There's nothing magical here.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

Sent from my iPhone

-- 
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.



[Rails] Re: Need help with starting the server please

2010-11-09 Thread venkata reddy
You have to place def file in the system32 folder and also all of them
shoud be of the same version..
go here:
http://www.sqlite.org/download.html

Scroll down to the Precompiled Binaries for Windows section and
download the 1st and 3rd downloads - this will give you the three
files.
Then unzip them into c:\ruby\bin

Also make sure you REMOVE any versions from c:\windows\system32

On Nov 8, 5:22 am, romeo rap  wrote:
> Hello, i got the missing sqlite3.dll error, i fixed it with
> downloading and placing both the .dll and the .exe in system32 and
> Ruby192\bin but now i get the error  "The procedure entry point
> sqlite3_backup_finish could not be loacated in the dynamic link
> library Sqlite3.dll"
>
> I want to run it on windows xp. Please help me out.. googled the
> problem and nothing seemed to work..

-- 
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.



Re: [Rails] Re: Need help on Dicom Image viewer

2010-09-11 Thread radhames brito
He had a path problem that was actually easy to solve and but he did convert
the image



""I have created a Rails application based on this tutorial:
http://dicom.rubyforge.org/tutorial1.html

I'm trying to view a DICOM image. I was able to convert .dcm to .jpg.

But, when I try to view the .jpg image I get as shown in the "Snapshot"
file attached within this message.

Where is the problem?

Thanks.
"

On Sat, Sep 11, 2010 at 11:58 AM, radhames brito  wrote:

> someone got this converted to jpg and then displayed on a view search the
> mailing list
>
>
> On Fri, Sep 10, 2010 at 1:57 PM, Marnen Laibow-Koser  > wrote:
>
>> A Sarkar wrote:
>> > DICOM is the image output of  an X-ray machine. X ray plates are
>> > things of past. Radiologists all over the world use DICOM images to
>> > read an X-ray. They have special monitor through which they can view
>> > the DICOM image. But the problem is that we cannot find a server
>> > version of DICOM image viewer that works on ROR platform.
>>
>> Why do you think you need a server-side viewer?  What have you found so
>> far, and why do you think they won't work with Rails?
>>
>> If you need a special viewer, it's probably implemented in client-side
>> Java or JavaScript.  Neither of those care in the slightest about Rails;
>> it's just a matter of furnishing them with the right image data.
>>
>> I'm about 90% certain that you're trying to solve this problem wrong.
>>
>> Best,
>> --
>> Marnen Laibow-Koser
>> http://www.marnen.org
>> mar...@marnen.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-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-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.



Re: [Rails] Re: Need help on Dicom Image viewer

2010-09-11 Thread radhames brito
someone got this converted to jpg and then displayed on a view search the
mailing list

On Fri, Sep 10, 2010 at 1:57 PM, Marnen Laibow-Koser
wrote:

> A Sarkar wrote:
> > DICOM is the image output of  an X-ray machine. X ray plates are
> > things of past. Radiologists all over the world use DICOM images to
> > read an X-ray. They have special monitor through which they can view
> > the DICOM image. But the problem is that we cannot find a server
> > version of DICOM image viewer that works on ROR platform.
>
> Why do you think you need a server-side viewer?  What have you found so
> far, and why do you think they won't work with Rails?
>
> If you need a special viewer, it's probably implemented in client-side
> Java or JavaScript.  Neither of those care in the slightest about Rails;
> it's just a matter of furnishing them with the right image data.
>
> I'm about 90% certain that you're trying to solve this problem wrong.
>
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
> mar...@marnen.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-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-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.



[Rails] Re: Need help on Dicom Image viewer

2010-09-10 Thread Marnen Laibow-Koser
A Sarkar wrote:
> DICOM is the image output of  an X-ray machine. X ray plates are
> things of past. Radiologists all over the world use DICOM images to
> read an X-ray. They have special monitor through which they can view
> the DICOM image. But the problem is that we cannot find a server
> version of DICOM image viewer that works on ROR platform.

Why do you think you need a server-side viewer?  What have you found so 
far, and why do you think they won't work with Rails?

If you need a special viewer, it's probably implemented in client-side 
Java or JavaScript.  Neither of those care in the slightest about Rails; 
it's just a matter of furnishing them with the right image data.

I'm about 90% certain that you're trying to solve this problem wrong.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.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-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.



[Rails] Re: Need help on Dicom Image viewer

2010-09-10 Thread A Sarkar
DICOM is the image output of  an X-ray machine. X ray plates are
things of past. Radiologists all over the world use DICOM images to
read an X-ray. They have special monitor through which they can view
the DICOM image. But the problem is that we cannot find a server
version of DICOM image viewer that works on ROR platform.

On Sep 9, 4:28 am, radhames brito  wrote:
> What is DICOM? i saw someone with this problem and solve it yesterday
>
>
>
> On Thu, Sep 9, 2010 at 1:17 AM, A Sarkar  wrote:
> > Hi,
>
> > We are developing an application that requires DICOM image viewer on
> > the server but we can not find a viewer that will work on ROR server.
> > There are no Gems available. Any help will be apreciated.
>
> > Regards
>
> > Amit
>
> > --
> > 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.- 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-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.



[Rails] Re: need help with redirection

2010-09-09 Thread Frederick Cheung


On Sep 9, 8:15 am, Silver Spoon  wrote:
> I want to create an web application that will link up a student's
> facebook, twitter and orkut accounts all under one shed. Its like
> connecting all the students within a college, to login into the web
> app, the userid will be the unique studentID provided by the college
> itself.
> Now, once a student has logged-in, he can open his facebook, twitter
> and orkut a/c in the same window, lets say under tabs. How can i do
> that??
> I mean how can i pass a student's Facebook's user-id and password to
> facebook server and if user authentication is done, then show the
> student his facebook wall.
> I am very confused and don't know how to deal with this.

Twitter & facebook both have apis that allow you to get at the user's
streams. You don't send their password though - a mechanism called
OAuth is used to get you a token that allows facebook etc to know that
the user has granted your application permission to access the user's
data (with various levels of granularity)

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-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.



Re: [Rails] Re: Need help with model logic

2010-09-02 Thread Colin Law
On 2 September 2010 16:37, Charlie B99  wrote:

Could you not top post please - insert your comments at the
appropriate place in previous mail, it makes it easier to follow the
thread, particularly for those that find this thread in the future.
Thanks

> Colin, thanks so much for all your input.  As you can see, I'm just
> muddling my way through all this, and all of your comments are very
> helpful.  I will go through them more when I get to the office...
>
> "remaining seats" = schedule.capacity - number of approved requests.
> So, if a schedule has a capacity of 10, and 8 requests with state_id = 3
> (approved), then there are 2 available slots before the capacity reaches
> 0 and no more requests can be accepted.
>
> Can I do request.schedule as a find in 2.3.5 or is that a 3.0 feature?

Most certainly you can.  I think maybe you would benefit from reading
the rails guides at http://guides.rubyonrails.org/v2.3.8/ Those will
be ok for 2.3.5 (why are you not using the latest 2.3 I wonder?).
Particularly Getting Started, ActiveRecord Associations, Routing, and
Debugging.

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-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.



[Rails] Re: Need help with model logic

2010-09-02 Thread Charlie B99
Colin, thanks so much for all your input.  As you can see, I'm just 
muddling my way through all this, and all of your comments are very 
helpful.  I will go through them more when I get to the office...

"remaining seats" = schedule.capacity - number of approved requests. 
So, if a schedule has a capacity of 10, and 8 requests with state_id = 3 
(approved), then there are 2 available slots before the capacity reaches 
0 and no more requests can be accepted.

Can I do request.schedule as a find in 2.3.5 or is that a 3.0 feature?

I used nitems because I didn't know any better.  :)

You've got me pointed in the right direction now - I'm new and messy, 
but I'm diggin it, so will keep pluggin away.

Thanks again!



Colin Law wrote:
> On 1 September 2010 17:59, Charlie B99  wrote:
>> Hi all -
>>
>> Ruby 1.8.7 / Rails 2.3.5
> 
> I have not worked right through your code but have got some comments
> that may help (or not).
> 
>> I want to list all requests pending my approval, along with the
>> remaining seats available.
> 
> What is a seat?  This is the first time you have mentioned it.
> 
>>
>> def listPendingRequest
> 
> I would advise using the rails convention for naming things, so this
> would be list_pending_requests
> 
>> @allRequests = Request.find(:all, :conditions => ["state_id = ?",
>> 2]).each{
>> |request|
>> @schedule = Schedule.find(:first, :conditions => ["id =
>> ?",request.schedule_id])
> 
> If the above is finding the schedule for request you don't need to do
> a find, just use
> @schedule = request.schedule.
> 
>> @num = Request.find(:all, :conditions => ["state_id = ? AND schedule_id
>> = ?", '3', @schedule.id]).nitems
> 
> Now that you have a schedule, the requests for that schedule are
> @schedule.requests, so you can do something like
> @num = @schedule.requests.find(:all, "state_id = ?", 3).count
> 
> Unless you need @num to be an instance variable of whatever class this
> ends up in then just make it a simple variable - num
> 
> Is there a reason why you are using nitems rather than count?
> 
>> @remaining = @schedule.capacity - @num
>> }
> 
> You have now dropped out of the block.  Note that you overwrote
> @remaining each time round. so it will now have the value of the last
> time round.  I am not sure that the block contents have achieved
> anything at all.
> 
>> @request = Array.new
> 
> If @request is going to contain a number of items call it @requests.
> 
>> @allRequests.each do |r|
>> if (r.state_id == 2 and r.approver_id == current_user.id)
> 
> I am not sure what is going on here as I am running out of time.  You
> have not told us the relationships between Request and User.  If you
> find yourself using something.id then very often you just need to
> setup the relationships in the right way and you can do the same sort
> of thing as with schedules and requests above.   So you may need
> something like User has_many approved_requests with approver_id as the
> foreign key, then User.approved_requests will give you the requests
> that user has approved.
> 
>> belongs in a model. �I don't know which model, though.
> I suspect that it may be User method as it returns his pending
> requests, but maybe not.  Also consider whether this is really the
> functionality you want.  Often when the return from a method is
> defined as returns something along with something else (as you have
> done here) you actually want two separate methods.  So maybe one that
> gives the users unnaproved requests (which would be a User method
> probably, and may have involve no code if you get the relationships
> right) and a separate one to return remaining seats available
> (whatever that means).
> 
> 
>>
>> Also, this method shows the remaining seats for the first schedule on
>> all of the requests, regardless of which schedule is being requested.
>> When I do a @schedule = Schedule.find(:all...), I get an error:
>> "undefined method 'capacity' for Array".
> 
> Does that only happen in the above code or do you mean that you just
> cannot do Schedule.find(:all)?  If you can do a simple find all then
> gradually add bits to the working one till you get the problem.  How
> can the method be showing anything if you get that error?
> 
> Sorry I have probably not been able to give this the thought it
> deserves but maybe this will at least be of some help.
> 
> Colin

-- 
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.



[Rails] Re: need help installing Rails 3 on non-Intel Mac

2010-07-26 Thread AppleII717
"MacPorts is the Devil" 

About a month ago I succeeded in getting rails3 working on a G4
MacMini after upgrading to 10.5.8 from 10.4.?.

There where problems and most of them revolved around MacPorts. I
installed rubygems using MacPorts and dependencies would start looking
for stuff in /usr/local and blow up. I finally just took /opt/local
out of the picture and used /library/ruby for gems and /usr/local for
all other stuff (compile from source on installer using with something
using /usr/local).

While not as bad, I also had problems with RVM - but it might have
just been my usage. The G4 is more or less my productions server and
was running a couple applications I moveed from 2.x (actually one from
1.x) to rails3beta4.

I'll agree with "maddox", MacPorts is the Devil.

Steve Alex


On Jul 25, 5:20 pm, Hassan Schroeder 
wrote:
> On Sun, Jul 25, 2010 at 3:12 PM, Dave Aronson
>
>  wrote:
> > RubyGems Environment:
> >  - RUBYGEMS VERSION: 1.3.7
> >  - RUBY VERSION: 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
> >  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
> >  - RUBY EXECUTABLE:
> > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> >  - EXECUTABLE DIRECTORY: /usr/bin
>
> Yep, look around to see if you have another `gem`; you may be using
> /usr/bin/gem by default, but your ports ruby has another one at e.g.
> /usr/local/bin/gem or /opt/local/bin/gem.
>
> If so, you just need to change your PATH to pick that up first.
>
> HTH,
> --
> 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-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.



Re: [Rails] Re: need help with validation, toggle, checkbox etc...

2010-07-01 Thread tom
ok thx


On Wed, Jun 30, 2010 at 8:59 PM, Me  wrote:

> You need to add condition, where if a box is checked show div.
>
> On Jun 30, 7:11 pm, tom  wrote:
> > hi,
> > im gettin lost with the subject. need some pointers:
> >
> > Usermodel:
> >   validates_presence_of :companyname,  :if => :is_company?
> >
> > <%= f.label "Are u representing a company?" %>
> > <%= f.check_box :is_company, :onclick => "new
> Effect.toggle('div_company');
> > //if($('user_is_company').value == 0){$('user_is_company').value =1;}
> > //if($('user_is_company').value == 1){$('user_is_company').value =0;}
> > //alert(escape($('user_is_company').value))"  %>
> >
> > 
> > 
> >  Details 
> >
> > <%= f.label "Company Name" %>
> > <%= f.text_field :companytitle %>
> > ..
> >
> > my problem is:
> > if someone is signing up AND checking the box "is_company" the company
> > detail div appears. now, if the company details dont pass the validation,
> > the page gets naturally reloaded and the checkbox is_company stays
> checked
> > but the div is hidden.
> >
> > tried several ways , but all end up in chaos
> >
> > does anyone have any working snippets?/thx
>
> --
> 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-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.



[Rails] Re: need help with validation, toggle, checkbox etc...

2010-06-30 Thread Me
You need to add condition, where if a box is checked show div.

On Jun 30, 7:11 pm, tom  wrote:
> hi,
> im gettin lost with the subject. need some pointers:
>
> Usermodel:
>   validates_presence_of     :companyname,      :if => :is_company?
>
> <%= f.label "Are u representing a company?" %>
> <%= f.check_box :is_company, :onclick => "new Effect.toggle('div_company');
> //if($('user_is_company').value == 0){$('user_is_company').value =1;}
> //if($('user_is_company').value == 1){$('user_is_company').value =0;}
> //alert(escape($('user_is_company').value))"  %>
>
> 
> 
>  Details 
>
> <%= f.label "Company Name" %>
> <%= f.text_field :companytitle %>
> ..
>
> my problem is:
> if someone is signing up AND checking the box "is_company" the company
> detail div appears. now, if the company details dont pass the validation,
> the page gets naturally reloaded and the checkbox is_company stays checked
> but the div is hidden.
>
> tried several ways , but all end up in chaos
>
> does anyone have any working snippets?/thx

-- 
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.



[Rails] Re: Need Help

2010-05-19 Thread chewmanfoo
by far the easiest way to use rails with apache is to use passenger:
http://www.modrails.com/

On May 19, 3:02 pm, Payah Bleh  wrote:
> I have this application installed on my computer
> apache HTTP Server 2.2
> Ruby 1.8.7
> Gems
> Rails
> Mysql 5.1
>
> in appache configuration file i made some change:
>
> From: Options Indexes FollowSymLinks
> To    : Options Indexes FollowSymLinks ExecCGI
>
> unmark AddHandler cgi-script .cgi .rb
>
> Then i go to command prompt with ruby then type this:
>
> rails Testing
> C:\Testing\ruby script\generate controller mytest
> C:\Testing\ruby script\server
>
> So the server up and running, then i type this on the browser
>
> http://localhost:3000/
>
> The welcome aboard page show up
>
> and when i type this on the browser:http://localhost:3000/mytest
>
> C:/Ruby/lib/ruby/1.8/timeout.rb:58: [BUG] Segmentation fault
> ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
>
> and in the browser say We're sorry, but something went wrong. We've been
> notified about this issue and we'll take a look at it shortly.
>
> Could anybody tell me where i did wrong, its just simple code?
> From what i read it suppose to say something like error can't find index
> in mytest
> because i havent define index in controller mytest
>
> For your information i already change database.yml in config folder
>
> development:
>   adapter: mysql
>   database: db
>   username: root
>   password: pass
>   host: localhost
> test:
>   adapter: mysql
>   database: db
>   username: root
>   password: pass
>   host: localhost
> production:
>   adapter: mysql
>   database: db
>   username: root
>   password: pass
>   host: localhost
>
> Thank you for any replies, i really appreciate it
> --
> 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-t...@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-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.



[Rails] Re: need help about gzip

2010-05-08 Thread Stephan Wehner


On May 8, 1:24 pm, nirosh  wrote:
> thanks for the reply. i have complete my rails app and hosted on
> hostmonster. but i dono how to enable the gzip on my app.i checked my
> hosted app  with yslow
> That shows like this "Grade F on Compress components with gzip". any
> idea about this.

Looks like a question for hostmonster  -- Stephan

> nirosh
>
> --
> 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 
> 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-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.



[Rails] Re: need help about gzip

2010-05-08 Thread nirosh
thanks for the reply. i have complete my rails app and hosted on
hostmonster. but i dono how to enable the gzip on my app.i checked my
hosted app  with yslow
That shows like this "Grade F on Compress components with gzip". any
idea about this.
nirosh

-- 
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.



[Rails] Re: need help about gzip

2010-05-08 Thread Frederick Cheung


On May 8, 8:18 pm, nirosh  wrote:
> i need the gzip plugin for rails app
> any body help me.
>
You've posted 3 messages about this. You're not getting any answers
because you're not telling us what you're trying to do.

Fred
> nirosh
>
> --
> 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 
> 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-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.



  1   2   3   >