Ruby on Rails Thursday, July 31, 2014

Hi all,

My name is Peng Zhao, the cofounder of VisualOps.io. We'd like to connect  with Ruby/Node.js/Python experts who are interested in building Ruby/Node.js/Python deployment templates with us.

First, to give you some background on VisualOps itself and the idea of an instant app & stack. VisualOps is a DevOps automation service. It allows you to visually build your own OpsWorks-like PaaS in the cloud. Compared with other solutions like Heroku, VisualOps poses no constraints on your application.

The idea is to offer prebuilt stacks (templates) so users can deploy an app in a matter of seconds, with the option to customize it to their requirements. We already have some ready-made stacks in store; Mongo DB, Wordpess, Nginx and more. We'd like to add Ruby, Node JS and Django into the repo, or ideally multiple stacks dependent on use case. 

In order to create the best possible app & stack we would greatly appreciate your expertise and input. If you are interested in collaboration with us please contact peng@visualops.io / georgia@visualops.io to discuss further. We hope to hear from you soon!

--
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+unsubscribe@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/69e0ba03-01fe-4ba6-bcab-02aab511da93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Jul 31, 2014, at 7:24 PM, Robert Walker wrote:

> Walter Davis wrote in post #1153927:
>> On Jul 31, 2014, at 8:47 AM, Colin Law wrote:
>> Also, if you expect a JavaScript to execute in a mail client (Outlook,
>> Gmail, Mail.app) you will be waiting a very long time. That door is
>> bolted securely shut for very good reason.
>
> If I'm not mistaken this is also true for most web based mail apps
> running in browsers. Running JavaScript from user provided input (i.e.
> the HTML email body) would very much open up the email viewer page to
> XSS attacks. I'm quite sure the web mail clients would aggressively
> strip all JavaScript from the contents of the email.

That's what I meant by adding Gmail in there. I forgot about the native Gmail client on iOS, so that was ambiguous. This goes all the way back to Hotmail before MS bought it. Even though the browser can run JS, they would be mad to let you do that to yourself without really aggressive sanitization.

Walter

>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@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/cef94a8a4ba524ad579826d7fccb3521%40ruby-forum.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+unsubscribe@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/C789E29F-DFF0-4040-9F12-4CCD3944793C%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Walter Davis wrote in post #1153927:
> On Jul 31, 2014, at 8:47 AM, Colin Law wrote:
> Also, if you expect a JavaScript to execute in a mail client (Outlook,
> Gmail, Mail.app) you will be waiting a very long time. That door is
> bolted securely shut for very good reason.

If I'm not mistaken this is also true for most web based mail apps
running in browsers. Running JavaScript from user provided input (i.e.
the HTML email body) would very much open up the email viewer page to
XSS attacks. I'm quite sure the web mail clients would aggressively
strip all JavaScript from the contents of the email.

--
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+unsubscribe@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/cef94a8a4ba524ad579826d7fccb3521%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

A copule of days ago tris very old request to Google App Engine was marked with a new label and changed status to Acknowledged.

https://code.google.com/p/googleappengine/issues/list?q=label:Language-Ruby

Does anyone knows further about this issue?
It creates some expectations o Google finally supporting Ruby on their cloud platform, isn't it?


Cheers,
Jorge

--
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+unsubscribe@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/f3371441-3ca7-4f0e-a2f2-37dbbcea033a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

You can simplify the arrays construction, too: (with slight reformatting of the arrays output)


irb2.1.1> arrays = Array.new(3) { Array.new }
#2.1.1 => [[], [], []]
irb2.1.1> 100.times {|id| arrays.sample.push(id) }
#2.1.1 => 100
irb2.1.1> arrays
#2.1.1 => [[0, 2, 6, 8, 9, 11, 14, 16, 17, 18, 22, 
            24, 29, 31, 37, 42, 47, 49, 53, 54, 57, 
            58, 60, 68, 69, 73, 75, 79, 80, 81, 83, 
            88, 91, 94, 95, 96], 
           [1, 3, 12, 13, 20, 25, 26, 28, 33, 34,
            38, 39, 43, 44, 48, 50, 52, 59, 63, 65,
            70, 72, 74, 77, 78, 82, 86, 87, 89, 97],
           [4, 5, 7, 10, 15, 19, 21, 23, 27, 30, 
            32, 35, 36, 40, 41, 45, 46, 51, 55, 56,
            61, 62, 64, 66, 67, 71, 76, 84, 85, 90,
            92, 93, 98, 99]]
irb2.1.1> arrays.map(&:size)
#2.1.1 => [36, 30, 34]

On 2014-Jul-31, at 12:00 , Eric Saupe <ericsaupe@gmail.com> wrote:

I knew there would be a nice simpler Ruby way. I love the second solution, Rob. Below is the updated example.
id = 100
arrays = [Array.new, Array.new, Array.new]
arrays.sample.push(id)

On Thursday, July 31, 2014 8:45:33 AM UTC-6, Rob Biedenharn wrote:

On 2014-Jul-30, at 10:59 , Eric Saupe <eric...@gmail.com> wrote:

To expand on what Scott is saying here is some code that gives an example of what he is referring to.

id = 100
x  = rand(1..3)
arrays = [Array.new, Array.new, Array.new]
selected_array = arrays[x]
selected_array
.push(id)

And to make it a bit more flexible, you could do:

arrays = [ Array.new,  Array.new,  Array.new ]
x = rand(arrays.size)
arrays[x].push(id)

or even:

arrays = [ Array.new,  Array.new,  Array.new ]
arrays.sample.push(id)


-Rob


On Tuesday, July 29, 2014 8:05:16 PM UTC-6, Scott Ribe wrote:
On Jul 29, 2014, at 7:33 PM, Dave Castellano <li...@ruby-forum.com> wrote:

> Novice question:
>
> I need to assign an item id to one of 3 arrays randomly but can't figure
> out how to specify the correct array by combining "arr" and the randomly
> generated number...
>
> id = "100"
> x = rand(1..3)
>
> arr1 = Array.new
> arr2 = Array.new
> arr3 = Array.new
>
> selected_array =  "#{'arr' + x}"  *** Not sure how to do this ****
>
> selected_array.push(id)
>

While you could append the name and eval, that's not really a clean approach. Just use an array of arrays. Or if else...


--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62d3b861-c606-4936-8540-08caae33e8fc%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+unsubscribe@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/931a7b70-e8bf-464a-90d8-ae0f4682ee3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

As a developer i have no doubt that ruby on rails is better than PHP. I already worked with PHP and now only use Ruby on Rails, the development is faster and easer.

But you need to look in the market, hire a php developer is easy and cheap than hire a RoR developer.


2014-07-31 16:18 GMT-03:00 Jordan Clarke <lists@ruby-forum.com>:
Hi all,

I'm looking to build an online marketplace that's similar to oDesk and
Elance where users can post jobs and have freelancers bid on them.


The current dilemma I'm in- which programming language do I go for? My
decision lies between PHP and Ruby. It might help you to know that I
already have the front-end of the web application already developed in
HTML5/CSS3/Bootstrap.


It seems that most web applications these days are being powered by Ruby
on Rails. I've been advised multiple times again and again: "Go with
Ruby on Rails. It's the new and best way to develop web applications."


What I'm wondering is- is there any real siginficant advantage to
developing my web application using the Ruby on Rails framework as
opposed to good ol' PHP?


Facebook, Pinterest, Flippa, 99Designs.com, Udemy, oDesk, and many other
huge companies were all developed using PHP, right? And there seems to
be more PHP developers available so if I were to hire a PHP developer to
help me build this, I'd have access to a large pool of readily available
talent.


On the other hand, I keep hearing that Ruby on Rails is the way to go
for web applications. Maybe it depends on the type of web application
being built? In my case- do you think a freelance marketplace platform
be better off built under PHP or Ruby? It might help you to know that I
already have the front-end of the web application already developed in
HTML5/CSS3/Bootstrap.



What are your thoughts on this?

--
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+unsubscribe@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/08087179d2b00d3c31ecda8f7a9793fb%40ruby-forum.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+unsubscribe@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/CAKj7%3DuRL%3DiQkyomkxyg9K7mW_i%3D2tBRmcWur0_j4bG1insXWDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 31 July 2014 17:42, Norbert Melzer <timmelzer@gmail.com> wrote:
> Show code... Without code Noone can tell

And tell us which guide, with link to it if it is online.

Colin

>
> Am 31.07.2014 17:27 schrieb "Carlo Giustinoni" <carlo.giustinoni@gmail.com>:
>
>> I have followed the guide for creating the first Rails application 'Blog',
>> I can't get the title : Rails is Awesome nor the Text : It really is to
>> render .
>>
>> Can anyone help ?
>>
>> 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+unsubscribe@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/f2d6d4fb-12bc-44bf-9f99-1c5f5dc83b3a%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+unsubscribe@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/CA%2BbCVsvoY99_5OwKdi2Nyy_TLVQAcHhNST%2B47S7ENDUbp_8DAw%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+unsubscribe@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%3D0gLt9tHFiaR%2BdxMcZqbo%2B%3DFeAdc2wj3VAxnJ4F42%2BN47MdQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi all,

I'm looking to build an online marketplace that's similar to oDesk and
Elance where users can post jobs and have freelancers bid on them.


The current dilemma I'm in- which programming language do I go for? My
decision lies between PHP and Ruby. It might help you to know that I
already have the front-end of the web application already developed in
HTML5/CSS3/Bootstrap.


It seems that most web applications these days are being powered by Ruby
on Rails. I've been advised multiple times again and again: "Go with
Ruby on Rails. It's the new and best way to develop web applications."


What I'm wondering is- is there any real siginficant advantage to
developing my web application using the Ruby on Rails framework as
opposed to good ol' PHP?


Facebook, Pinterest, Flippa, 99Designs.com, Udemy, oDesk, and many other
huge companies were all developed using PHP, right? And there seems to
be more PHP developers available so if I were to hire a PHP developer to
help me build this, I'd have access to a large pool of readily available
talent.


On the other hand, I keep hearing that Ruby on Rails is the way to go
for web applications. Maybe it depends on the type of web application
being built? In my case- do you think a freelance marketplace platform
be better off built under PHP or Ruby? It might help you to know that I
already have the front-end of the web application already developed in
HTML5/CSS3/Bootstrap.



What are your thoughts on this?

--
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+unsubscribe@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/08087179d2b00d3c31ecda8f7a9793fb%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

gem to create select for country and state
 

--
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+unsubscribe@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/2ec05027-a71c-48c4-beee-94e56d0af369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Show code... Without code Noone can tell

Am 31.07.2014 17:27 schrieb "Carlo Giustinoni" <carlo.giustinoni@gmail.com>:
I have followed the guide for creating the first Rails application 'Blog', I can't get the title : Rails is Awesome nor the Text : It really is to render .

Can anyone help ?

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+unsubscribe@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/f2d6d4fb-12bc-44bf-9f99-1c5f5dc83b3a%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+unsubscribe@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/CA%2BbCVsvoY99_5OwKdi2Nyy_TLVQAcHhNST%2B47S7ENDUbp_8DAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Jul 31, 2014, at 10:00 AM, Eric Saupe <ericsaupe@gmail.com> wrote:

> I knew there would be a nice simpler Ruby way. I love the second solution, Rob. Below is the updated example.

One tiny note, this is purely a matter of style & taste, spelling it out vs concision, but I thought it might be good for your learning to understand that you could also use:

arrays = [[], [], []]

And, if you wanted a set of arrays that you access by string instead of int:

arrays = {'one' => [], 'two' => [], 'three' => []}
arrays['one'].push(42)
puts arrays['one'][0]

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




--
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+unsubscribe@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/921549A3-013A-42CC-81DC-C9D893BDDBE5%40elevated-dev.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I knew there would be a nice simpler Ruby way. I love the second solution, Rob. Below is the updated example.
id = 100
arrays = [Array.new, Array.new, Array.new]
arrays.sample.push(id)

On Thursday, July 31, 2014 8:45:33 AM UTC-6, Rob Biedenharn wrote:

On 2014-Jul-30, at 10:59 , Eric Saupe <eric...@gmail.com> wrote:

To expand on what Scott is saying here is some code that gives an example of what he is referring to.

id = 100
x  = rand(1..3)
arrays = [Array.new, Array.new, Array.new]
selected_array = arrays[x]
selected_array
.push(id)

And to make it a bit more flexible, you could do:

arrays = [ Array.new,  Array.new,  Array.new ]
x = rand(arrays.size)
arrays[x].push(id)

or even:

arrays = [ Array.new,  Array.new,  Array.new ]
arrays.sample.push(id)


-Rob


On Tuesday, July 29, 2014 8:05:16 PM UTC-6, Scott Ribe wrote:
On Jul 29, 2014, at 7:33 PM, Dave Castellano <li...@ruby-forum.com> wrote:

> Novice question:
>
> I need to assign an item id to one of 3 arrays randomly but can't figure
> out how to specify the correct array by combining "arr" and the randomly
> generated number...
>
> id = "100"
> x = rand(1..3)
>
> arr1 = Array.new
> arr2 = Array.new
> arr3 = Array.new
>
> selected_array =  "#{'arr' + x}"  *** Not sure how to do this ****
>
> selected_array.push(id)
>

While you could append the name and eval, that's not really a clean approach. Just use an array of arrays. Or if else...


--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62d3b861-c606-4936-8540-08caae33e8fc%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+unsubscribe@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/931a7b70-e8bf-464a-90d8-ae0f4682ee3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I have followed the guide for creating the first Rails application 'Blog', I can't get the title : Rails is Awesome nor the Text : It really is to render .

Can anyone help ?

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+unsubscribe@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/f2d6d4fb-12bc-44bf-9f99-1c5f5dc83b3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails


On 2014-Jul-30, at 10:59 , Eric Saupe <ericsaupe@gmail.com> wrote:

To expand on what Scott is saying here is some code that gives an example of what he is referring to.

id = 100
x  = rand(1..3)
arrays = [Array.new, Array.new, Array.new]
selected_array = arrays[x]
selected_array
.push(id)

And to make it a bit more flexible, you could do:

arrays = [ Array.new,  Array.new,  Array.new ]
x = rand(arrays.size)
arrays[x].push(id)

or even:

arrays = [ Array.new,  Array.new,  Array.new ]
arrays.sample.push(id)


-Rob


On Tuesday, July 29, 2014 8:05:16 PM UTC-6, Scott Ribe wrote:
On Jul 29, 2014, at 7:33 PM, Dave Castellano <li...@ruby-forum.com> wrote:

> Novice question:
>
> I need to assign an item id to one of 3 arrays randomly but can't figure
> out how to specify the correct array by combining "arr" and the randomly
> generated number...
>
> id = "100"
> x = rand(1..3)
>
> arr1 = Array.new
> arr2 = Array.new
> arr3 = Array.new
>
> selected_array =  "#{'arr' + x}"  *** Not sure how to do this ****
>
> selected_array.push(id)
>

While you could append the name and eval, that's not really a clean approach. Just use an array of arrays. Or if else...


--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





--
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+unsubscribe@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/62d3b861-c606-4936-8540-08caae33e8fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Jul 31, 2014, at 8:47 AM, Colin Law wrote:

> On 31 July 2014 12:39, Raudra <raudra.pratap@strata.co.in> wrote:
>> I want to implement a javascript call in callback mail. There is any way to
>> do this ..
>
> Can you explain what you mean by 'callback mail'?
>
> Colin

Also, if you expect a JavaScript to execute in a mail client (Outlook, Gmail, Mail.app) you will be waiting a very long time. That door is bolted securely shut for very good reason.

Walter


--
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+unsubscribe@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/8507DCB6-40EC-41FB-AC6E-E206FA152E10%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

@Tsolmon,

 You can try this
ActiveRecord::Base.connection.execute("procedure_name")


On Thu, Jul 31, 2014 at 5:51 PM, Tsolmon Narantsogt <mnts26@gmail.com> wrote:
Hello Comrades

How to call stored Procedure(mysql) in rails.
i'm using rails 3.2

--
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+unsubscribe@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/CAPs6WScrwGWnquq0%2BWWFSYz9oxbA9MAUbT02b2iqHuGZYoatCA%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+unsubscribe@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/CAEGezZXNkC04TmeTVhTzBLiHUYF8G25%2Bo3hrLfzAjdf%3DW1TX1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 31 July 2014 12:39, Raudra <raudra.pratap@strata.co.in> wrote:
> I want to implement a javascript call in callback mail. There is any way to
> do this ..

Can you explain what you mean by 'callback mail'?

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+unsubscribe@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%3D0gLv3o%3DGoMaXRx%2BcpGwu7u11%2BrOAMjHJhS_hfsGPTcVjmeg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hello Comrades

How to call stored Procedure(mysql) in rails.
i'm using rails 3.2

--
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+unsubscribe@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/CAPs6WScrwGWnquq0%2BWWFSYz9oxbA9MAUbT02b2iqHuGZYoatCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I want to implement a javascript call in callback mail. There is any way to do this ..

Answer will be appreciated ,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+unsubscribe@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/093b97e9-3c3f-4027-94d6-cc26aad48ae9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, July 30, 2014

Thanks very much.   



On Wednesday, July 30, 2014 5:52:41 PM UTC-4, Dan Boyle wrote:
Hello, 

I am very new to Ruby on Rails.  I am working my way through the guides at rubyonrails.org.  It isn't going very quickly but I am determined to make it work. 

Here is a very basic question but I just can't figure it out by looking at the examples.  It is regarding embedded ruby.  

What is the difference between these two forms of embedded code. 

<%=  ... some code ...  %> 

and 

<%  ... some code ... %> 

Some lines have the equal sign in it and most of them don't.  I just want to know what the rule is for using either. 

Thanks. 

Dan 

 

--
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+unsubscribe@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/e1d5a9d7-34e9-4c2e-8572-4f50bf09a007%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

<%= %> appends to the output and <% %> doesn't.
<% %> is for control statements such as `if`, whereas things that generate HTML or strings to be included in the document should use <%= %>.


For example:

<% if should_apologize? %>
  <%= "I'm sorry #{name}." %>
<% else %>
  <%= "I'm not sorry. You deserved it, #{name}." %>
<% end %>



On Wed, Jul 30, 2014 at 3:52 PM, Dan Boyle <dan.boyle.dc@gmail.com> wrote:
Hello, 

I am very new to Ruby on Rails.  I am working my way through the guides at rubyonrails.org.  It isn't going very quickly but I am determined to make it work. 

Here is a very basic question but I just can't figure it out by looking at the examples.  It is regarding embedded ruby.  

What is the difference between these two forms of embedded code. 

<%=  ... some code ...  %> 

and 

<%  ... some code ... %> 

Some lines have the equal sign in it and most of them don't.  I just want to know what the rule is for using either. 

Thanks. 

Dan 

 

--
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+unsubscribe@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/e5814049-71fa-4096-a959-9b26a3b992a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Daniel Evans

--
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+unsubscribe@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/CAD2%3DUWWGLec3AN9XyV%3DTeDuYPiYD2HTv3SpT8B-KfEqD%2B%2BSh0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hello, 

I am very new to Ruby on Rails.  I am working my way through the guides at rubyonrails.org.  It isn't going very quickly but I am determined to make it work. 

Here is a very basic question but I just can't figure it out by looking at the examples.  It is regarding embedded ruby.  

What is the difference between these two forms of embedded code. 

<%=  ... some code ...  %> 

and 

<%  ... some code ... %> 

Some lines have the equal sign in it and most of them don't.  I just want to know what the rule is for using either. 

Thanks. 

Dan 

 

--
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+unsubscribe@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/e5814049-71fa-4096-a959-9b26a3b992a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hello, 

I am new to Rails and work my way through the guides at 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+unsubscribe@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/6c654482-e389-4cff-820b-862a6b678d37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

For now we seem to worked around this problem by specifying the following code
in a cucumber support file:

require 'minitest/autorun'
require 'test/unit/assertions'

World( Test::Unit::Assertions )

require 'minitest'
module Minitest
attr_accessor :assertions
end


At least, things are no longer blowing up as soon as the feature run starts.
It is yet to be determined whether this is a real fix as we have run into some
other issues with AR-4.1 vis a vis code that runs fine with AR-4.0.

--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

--
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+unsubscribe@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/c7cc7121d2da5eb8c59f1ed810485e84.squirrel%40webmail.harte-lyne.ca.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

BTW, I get the same error even if I am using Ruby 2.1.2

--
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+unsubscribe@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/277c47eba61469e307e03af0ef0f05b5%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi, We are trying to connect an app that was using postgre to use MS
SQL Server on a Centos 6 oracle virtualbox vm.

We have installed the activerecord-sqlserver-adapter and tiny_tds gems
packages. The list of gems installed for this app are shown below.


actionmailer (4.0.1)
actionpack (4.0.1)
activemodel (4.1.4, 4.0.1)
activerecord (4.1.4, 4.0.1)
activerecord-deprecated_finders (1.0.3)
activerecord-sqlserver-adapter (4.1.0, 4.0.0)
activesupport (4.1.4, 4.0.1)
arel (5.0.1.20140414130214, 4.0.1)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
bigdecimal (1.1.0)
bitters (0.9.1)
bourbon (3.1.8)
builder (3.1.4)
bundler (1.6.5)
bundler-unload (1.0.2)
coffee-rails (4.0.1)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
devise (3.2.2)
erubis (2.7.0)
execjs (2.0.2)
executable-hooks (1.3.2)
font-awesome-sass (4.0.2)
gem-wrappers (1.2.5)
haml (4.0.4)
hike (1.2.3)
i18n (0.6.11, 0.6.5)
io-console (0.3)
jbuilder (1.5.2)
jquery-rails (3.0.4)
json (1.8.1, 1.5.5)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (1.25)
minitest (5.4.0, 4.7.5, 2.5.1)
multi_json (1.8.2)
neat (1.4.0)
orm_adapter (0.5.0)
pg (0.17.1)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.1)
rails_12factor (0.0.2)
rails_serve_static_assets (0.0.1)
rails_stdout_logging (0.0.3)
railties (4.0.1)
rake (10.1.0, 0.9.2.2)
rdoc (3.12.2, 3.9.5)
ref (1.0.5)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
sass (3.2.12)
sass-rails (4.0.1)
sdoc (0.3.20)
sprockets (2.10.0)
sprockets-rails (2.0.1)
therubyracer (0.12.1)
thor (0.18.1)
thread_safe (0.1.3)
tilt (1.4.1)
tiny_tds (0.6.2)
treetop (1.4.15)
turbolinks (1.3.1)
tzinfo (1.2.1, 0.3.38)
uglifier (2.3.1)
warden (1.2.3)



Our database.yml file has the following.

development:
adapter: sqlserver
database: rubydemo
user: User1
dataserver: machine.domain.local
port: 1433
password: dsfsdfsdfsf


when we telnet to the sql server machine.domain.local on port 1433, it
responds as does a ping, so the port and network seem to work.

We get the errors below when doing rake db:setup

Any ideas what we might be missing or what we can try.

Thanks
Lance



(in /var/www/html/rubydemo)
DEPRECATION WARNING: This database tasks were deprecated, because this
tasks should be served by the 3rd party adapter. (called from
mon_synchronize at
/usr/local/rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/monitor.rb:211)
sorry, your database adapter is not supported yet, feel free to submit a
patch
rake aborted!
Adaptive Server connection failed
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/tiny_tds-0.6.2/lib/tiny_tds/client.rb:77:in
`connect'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/tiny_tds-0.6.2/lib/tiny_tds/client.rb:77:in
`initialize'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-sqlserver-adapter-4.0.0/lib/active_record/connection_adapters/sqlserver_adapter.rb:287:in
`new'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-sqlserver-adapter-4.0.0/lib/active_record/connection_adapters/sqlserver_adapter.rb:287:in
`dblib_connect'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-sqlserver-adapter-4.0.0/lib/active_record/connection_adapters/sqlserver_adapter.rb:276:in
`connect'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-sqlserver-adapter-4.0.0/lib/active_record/connection_adapters/sqlserver_adapter.rb:62:in
`initialize'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-sqlserver-adapter-4.0.0/lib/active_record/sqlserver_base.rb:17:in
`new'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-sqlserver-adapter-4.0.0/lib/active_record/sqlserver_base.rb:17:in
`sqlserver_connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in
`new_connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in
`checkout_new_connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in
`acquire_connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in
`block in checkout'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in
`checkout'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in
`block in connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in
`connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in
`retrieve_connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_handling.rb:79:in
`retrieve_connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/connection_handling.rb:53:in
`connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/migration.rb:611:in
`connection'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/migration.rb:624:in
`block in method_missing'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/migration.rb:597:in
`block in say_with_time'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/migration.rb:597:in
`say_with_time'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/migration.rb:617:in
`method_missing'
/var/www/html/rubydemo/db/schema.rb:17:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/schema.rb:42:in
`instance_eval'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/schema.rb:42:in
`define'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/schema.rb:62:in
`define'
/var/www/html/rubydemo/db/schema.rb:14:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in
`load'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in
`block in load'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in
`load_dependency'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in
`load'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/railties/databases.rake:253:in
`block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/gems/activerecord-4.0.1/lib/active_record/railties/databases.rake:260:in
`block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/bin/ruby_executable_hooks:15:in
`eval'
/usr/local/rvm/gems/ruby-1.9.3-p547@onlife-ruby-demo/bin/ruby_executable_hooks:15:in
`<main>'
Tasks: TOP => db:schema:load
(See full trace by running task with --trace)

--
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+unsubscribe@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/61461c20013c24b0571c154c208f3e22%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wed, July 30, 2014 10:42, Matt Jones wrote:
> The underlying issue is mentioned here in Minitest:
>
> https://github.com/seattlerb/minitest/blob/master/lib/minitest/assertions.rb#L8-L12
>
> Whatever is including the `assert` functions needs to also define the
> `assertions` accessor.
>
> Hard to advise further without seeing the relevant code in
> hll_dbms_steps.rb.
>

The relevant code seems to be:

<pre>
# features/step_definitions/hll_dbms_steps.rb

def find_table_model_for( tname )
tname = tname.gsub(/ +/,"_").downcase.singularize.camelcase
expected = true
actual = defined?( tname )
message = "Expected #{tname} model class but it is not defined"
assert( ( expected == actual ), message )
end

When /should have (?:a|the) table (?:name|call)ed "?(\w+)"?/ do |tname|
find_table_model_for( tname )
end
</pre>

--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

--
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+unsubscribe@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/cb544293e2e5b4c98dde02d2903df02b.squirrel%40webmail.harte-lyne.ca.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

To expand on what Scott is saying here is some code that gives an example of what he is referring to.

id = 100
x  
= rand(1..3)
arrays
= [Array.new, Array.new, Array.new]
selected_array
= arrays[x]
selected_array
.push(id)



On Tuesday, July 29, 2014 8:05:16 PM UTC-6, Scott Ribe wrote:
On Jul 29, 2014, at 7:33 PM, Dave Castellano <li...@ruby-forum.com> wrote:

> Novice question:
>
> I need to assign an item id to one of 3 arrays randomly but can't figure
> out how to specify the correct array by combining "arr" and the randomly
> generated number...
>
> id = "100"
> x = rand(1..3)
>
> arr1 = Array.new
> arr2 = Array.new
> arr3 = Array.new
>
> selected_array =  "#{'arr' + x}"  *** Not sure how to do this ****
>
> selected_array.push(id)
>

While you could append the name and eval, that's not really a clean approach. Just use an array of arrays. Or if else...


--
Scott Ribe
scott...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




--
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+unsubscribe@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/62d3b861-c606-4936-8540-08caae33e8fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Tuesday, 29 July 2014 15:53:58 UTC-4, byrnejb wrote:
If there is a list devoted to ActiveRecord problems then I would appreciate a redirect.  In the absence of same I need some assistance with part of RoRs stack, namely ActiveRecord and the testing thereof.  I have a cli project which only uses AR-4.0 and whatever other stuff that gem pulls in. I am trialing the project witjh AR-4.1 and I am getting this error when I try to run my cucumber features:

     
undefined method `assertions' for #<String:0x00000003ba4688> (NoMethodError)
      /home/byrnejb/Projects/Software/theHeart/code/hll_th_cadex_xfer/libexec/bundler/ruby/2.1.0/gems/rspec-expectations-3.0.3/lib/rspec/matchers.rb:902:in `
method_missing'
      /home/byrnejb/Projects/Software/theHeart/code/hll_th_cadex_xfer/libexec/bundler/ruby/2.1.0/gems/minitest-5.4.0/lib/minitest/assertions.rb:126:in `assert'

     
/usr/lib64/ruby/2.1.0/test/unit/assertions.rb:36:in `assert'
      /home/byrnejb/Projects/Software/theHeart/code/hll_th_cadex_xfer/features/step_definitions/hll_dbms_steps.rb:15:in `
find_table_model_for'
      /home/byrnejb/Projects/Software/theHeart/code/hll_th_cadex_xfer/features/step_definitions/hll_dbms_steps.rb:30:in `block in <top (required)>'


I googled for this and found a couple of tangential references relating to a change in minitest. However, the fix appears to be somewhat dated and in any case this is not a full RoR stack so rspec-rails is not applicable.


https://stackoverflow.com/questions/16867707/rails-4-and-rspec-undefined-method-assertions-in-routing-spec

This problem is caused by a change in minitest 5.0 documented here:
# https://github.com/seattlerb/minitest/issues/286
is fixed by using: gem "rspec-rails", '~> 2.14.0.rc1'
in the gemfile.



The underlying issue is mentioned here in Minitest:

https://github.com/seattlerb/minitest/blob/master/lib/minitest/assertions.rb#L8-L12

Whatever is including the `assert` functions needs to also define the `assertions` accessor.

Hard to advise further without seeing the relevant code in hll_dbms_steps.rb.

--Matt Jones 

--
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+unsubscribe@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/a362c73a-68e6-4cde-8dff-17cd255cd34a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, July 29, 2014

On Jul 29, 2014, at 7:33 PM, Dave Castellano <lists@ruby-forum.com> wrote:

> Novice question:
>
> I need to assign an item id to one of 3 arrays randomly but can't figure
> out how to specify the correct array by combining "arr" and the randomly
> generated number...
>
> id = "100"
> x = rand(1..3)
>
> arr1 = Array.new
> arr2 = Array.new
> arr3 = Array.new
>
> selected_array = "#{'arr' + x}" *** Not sure how to do this ****
>
> selected_array.push(id)
>

While you could append the name and eval, that's not really a clean approach. Just use an array of arrays. Or if else...


--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




--
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+unsubscribe@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/4A8D974A-3F8F-449E-B0C3-83C4C3209D4B%40elevated-dev.com.
For more options, visit https://groups.google.com/d/optout.