Ruby on Rails Wednesday, April 24, 2019

Dear All,

We have recently released a survey on understanding the challenges that practitioners face with about software modeling and the particular problems that practitioners wish the researchers in academia to deal with. 


The survey takes 2-7 minutes at most, and your contribution to the survey is extremely valuable and highly needed. Can you please support our research by filling in the survey?

The survey results will be made available online and published as a scientific journal/conference paper. 

Best,
Mert

--
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/ca3e0e4a-c53e-496c-a595-9c0136d50ed5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Saturday, April 20, 2019

Hi All,

The issue gotbredolved after I increase the RAM size to 4GB from 1GB.

On Fri, Apr 19, 2019 at 7:38 PM Fatih Orhan <fatihorhan@gmail.com> wrote:
Error number 2 means file not found. This is likely a MySQL server problem.
I suggest checking system logs, MySQL logs and auth log.
This guy found the reason to be hackers trying to get in: http://forums.devshed.com/mysql-help-4/intermittent-cant-connect-mysql-socket-937298.html

--
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/5878c294-3d45-4217-ac81-0bdd17dd09b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
regards,
Loganathan

Sent from handheld device.

--
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/CAD_i5MGU3bmvrK0ZojAQmGzuaRQNvBr6wfMO8MKwdmDif28o6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Friday, April 19, 2019

When you send a message from client to server, the server doesn't automatically re-broadcast (echo) it. You need to handle message server-side, like this snipped from docs:
# app/channels/chat_channel.rb
class ChatChannel < ApplicationCable::Channel
  def subscribed
    stream_from "chat_#{params[:room]}"
  end
 
  def receive(data)
    ActionCable.server.broadcast("chat_#{params[:room]}", data)
  end
end

Check out the guides if you haven't: https://guides.rubyonrails.org/action_cable_overview.html

19 Nisan 2019 Cuma 14:38:19 UTC+3 tarihinde robert.p...@gmail.com yazdı:
I am trying to use action cable. 

I got the server to send to the client. But I also want the client to send to the server.

I tried this in my coffeescript file

App.hasdfg = App.cable.subscriptions.create "HasdfgChannel",    connected: ->      # Called when the subscription is ready for use on the server      disconnected: ->      # Called when the subscription has been terminated by the server      received: (data) ->      # Called when there's incoming data on the websocket for this channel      alert(data);      #App.hasdfg.send   # sent_by: 'Paul'   # body: 'This is a cool chat app.'    #App.hasdfg.send  #    "yyy"    App.hasdfg.send 'This is a cool chat app.'


but that last line isn't working

that last line doesn't seem to cause an alert, so it doesn't seem to trigger the received method

I know the alert line works though because when sending a message from server to client, I trigger it.   (I have a line in my controller broadcasting a message to the channel and that triggers the alert fine).

It's just that the last line in the coffeescript, which is meant to send from client to server, is not triggering that received method, / is not causing an alert.

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/90f768af-019e-4c13-9b35-d554114c9a44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Chrome does not expire cookies, ever. Even when you set correct parameters. So don't rely on the browser to invalidate cookies after browser closes or after some duration offline. We keep last request time in session data and expire sessions server side.

Users will have their password stolen. log successfull and failed logins with IP to investigate later. And be prepared to add IP white listing and 2 factor auth later.

--
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/5869949c-5396-4c27-9501-44688df3d048%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

The received method is called when the client receives data from the server, if you want to know if the client is sending the data properly to the server check the server log. The received method is not supposed to be called when the client sends a message to the server.

El vie., 19 abr. 2019 08:38, <robert.phillips37@gmail.com> escribió:
I am trying to use action cable. 

I got the server to send to the client. But I also want the client to send to the server.

I tried this in my coffeescript file

App.hasdfg = App.cable.subscriptions.create "HasdfgChannel",    connected: ->      # Called when the subscription is ready for use on the server      disconnected: ->      # Called when the subscription has been terminated by the server      received: (data) ->      # Called when there's incoming data on the websocket for this channel      alert(data);      #App.hasdfg.send   # sent_by: 'Paul'   # body: 'This is a cool chat app.'    #App.hasdfg.send  #    "yyy"    App.hasdfg.send 'This is a cool chat app.'


but that last line isn't working

that last line doesn't seem to cause an alert, so it doesn't seem to trigger the received method

I know the alert line works though because when sending a message from server to client, I trigger it.   (I have a line in my controller broadcasting a message to the channel and that triggers the alert fine).

It's just that the last line in the coffeescript, which is meant to send from client to server, is not triggering that received method, / is not causing an alert.

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/72e7ca5b-11fa-4163-8626-a990f1b63bd8%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/CAPS3bcAkdo6xw_dh%2Bi691eEa2921rzWenmJ80EL6A0xaddCoLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I am trying to use action cable. 

I got the server to send to the client. But I also want the client to send to the server.

I tried this in my coffeescript file

App.hasdfg = App.cable.subscriptions.create "HasdfgChannel",    connected: ->      # Called when the subscription is ready for use on the server      disconnected: ->      # Called when the subscription has been terminated by the server      received: (data) ->      # Called when there's incoming data on the websocket for this channel      alert(data);      #App.hasdfg.send   # sent_by: 'Paul'   # body: 'This is a cool chat app.'    #App.hasdfg.send  #    "yyy"    App.hasdfg.send 'This is a cool chat app.'


but that last line isn't working

that last line doesn't seem to cause an alert, so it doesn't seem to trigger the received method

I know the alert line works though because when sending a message from server to client, I trigger it.   (I have a line in my controller broadcasting a message to the channel and that triggers the alert fine).

It's just that the last line in the coffeescript, which is meant to send from client to server, is not triggering that received method, / is not causing an alert.

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/72e7ca5b-11fa-4163-8626-a990f1b63bd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

thanks local and ariel

--
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/5bb5642f-40d3-4e41-b080-4606a1e9e25b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Thursday, April 18, 2019

Error number 2 means file not found. This is likely a MySQL server problem.
I suggest checking system logs, MySQL logs and auth log.
This guy found the reason to be hackers trying to get in: http://forums.devshed.com/mysql-help-4/intermittent-cant-connect-mysql-socket-937298.html

--
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/5878c294-3d45-4217-ac81-0bdd17dd09b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, April 16, 2019

I all comes down to the context where the code is executed. Rails console context (self) is the "main" object, while, in the view, the context is the view class which includes a lot of helpers.

The main object on the console has an "app" method, a "helpers" methods, etc, but the view class does not (it includes some methods on itself). That's why you can't call "app.something" on the view, there's no "app".

The case of the object as an argument is similar, link_to, under th hoods, uses "url_for", if you do app.url_for(@z) on the console you'll get the url but link_to is running on a different context (you are calling "helper.link_to", not just "link_to").

They are just different context with different available methods (check self.methods on both the console and when rendering a view an you'll see it's really diferent)

El mar., 16 abr. 2019 a las 0:22, Robert Phillips (<robert.phillips37@gmail.com>) escribió:
I have a question about using link_to  in template and in console

Say I do rails new blah,  I make a model called User, I make a table users, each user has a field called 'name'.  I have resources :users, in  config/routes.rb And I add some users.

in template, I can do 

<% @z=User.find_by(name:"bob") %>
<%= link_to 'aaa',@z   %>

I understand that it will take that variable @z  which is a reference to a user, and will convert it to  user_path(@z.id)

And I can do for example

<%= link_to 'aaa',user_path(@z.id) %>

And in the console, I can say 

>puts app.user_path(1)
/users/1

But I notice that in the console I can't do that shorthand as shown above with @z

I can say 

irb(main):003:0> helper.link_to("aaa",app.user_path(4))
=> "<a href=\"/users/4\">aaa</a>"
#<User id: 3, name: "bob">

irb> user=User.find_by(name:"bob")
irb(main):005:0> helper.link_to("aaa",user)
Traceback (most recent call last):
        1: from (irb):5
ArgumentError (arguments passed to url_for can't be handled. Please require routes or provide your own implementation)
irb(main):006:0> 

And also, I notice that in the template, while I can say user_path(@z.id), I can't say app.user_path(@z.id)

Why is it that in the console, I can't use that shorthand of writing @z or user, in a link_to, with that variable as an argument, when that variable points to a user. Whereas I can in a template.

And why is it that in a template, I can't refer to app.user_path  only to user_path ?

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/02beb053-f703-4611-99ce-8f6091d0655b%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/CAPS3bcDE6R4tQihoTLLxvhLC4EgbOafzPzcvztNsxuE6oVvqUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

actually it uses `to_param` to convert to the path (fallsback to id if not defined I think).

you could do something like app.instance_eval { link_to "bob", @bob } and app.instance_eval { link_to "bob", user_path(@bob) } etc.

--
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/b2f77cb6-4d6d-4aa5-9a2b-dea5a87c529b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Monday, April 15, 2019

I have a question about using link_to  in template and in console

Say I do rails new blah,  I make a model called User, I make a table users, each user has a field called 'name'.  I have resources :users, in  config/routes.rb And I add some users.

in template, I can do 

<% @z=User.find_by(name:"bob") %>
<%= link_to 'aaa',@z   %>

I understand that it will take that variable @z  which is a reference to a user, and will convert it to  user_path(@z.id)

And I can do for example

<%= link_to 'aaa',user_path(@z.id) %>

And in the console, I can say 

>puts app.user_path(1)
/users/1

But I notice that in the console I can't do that shorthand as shown above with @z

I can say 

irb(main):003:0> helper.link_to("aaa",app.user_path(4))
=> "<a href=\"/users/4\">aaa</a>"
#<User id: 3, name: "bob">

irb> user=User.find_by(name:"bob")
irb(main):005:0> helper.link_to("aaa",user)
Traceback (most recent call last):
        1: from (irb):5
ArgumentError (arguments passed to url_for can't be handled. Please require routes or provide your own implementation)
irb(main):006:0> 

And also, I notice that in the template, while I can say user_path(@z.id), I can't say app.user_path(@z.id)

Why is it that in the console, I can't use that shorthand of writing @z or user, in a link_to, with that variable as an argument, when that variable points to a user. Whereas I can in a template.

And why is it that in a template, I can't refer to app.user_path  only to user_path ?

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/02beb053-f703-4611-99ce-8f6091d0655b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Sunday, April 14, 2019

Hi,

Company name - Haven Infoline (https://lockated.com/)

The company is location Mumbai, India.

Requirement
  • 2+ years experience of development experience with Ruby on Rails (RoR) Back-end as well web application.
  • Very Good coding skills need to write optimized smart code.

For more information you contact me
peyushchowhan7@gmail.com
+919533470078

Thanks & Regards,

--
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/b58301fe-af3d-4780-82e5-481fa1ee8dcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Thursday, April 11, 2019

Ruby on Rails Community - 

My name is Michael C. Bertoni and I'm the Founder & CTO of PhillyTech and the SVP of Business Development with Source Meridian. We are currently experiencing hyper-growth and need to add 20 engineers to our teams in Philadelphia, Medellin, Cali, Reonegro, Colombia. Do you know any RoR engineers in South America??? Or do you want to relocate to South America?

Here's the job and overview below - http://smrtr.io/353rz - You can review, apply and refer people

Please Connect with me on LinkedIn - I have over 14,000 1st Connections on LinkedIn and am among the Top 1% most connected - https://www.linkedin.com/in/michaelbertoni33/

--------------------------------------------------------------------------------------------------

SOURCE MERIDIAN OVERVIEW  "YOUR COMPETITIVE ADVANTAGE"

Source Meridian is one of the fastest growing companies in the Colombia region and is an engineering and development focused services organization providing customers with early access to cutting edge technology, and helping them to create and maintain their competitive advantage in the marketplace. Most of our clients are in the United States, but we also have clients in Europe and throughout the world. We have two offices in the United States and three offices in Latin America. Our offices are located in Philadelphia (US), Fort Myers (US), Medellín (CO), Rionegro (CO) and Cali (CO).

Job Description and Overview
  • You will be working with a world class engineering team of smart, driven globally experienced and globally distributed engineers designing, developing and maintaining enterprise-level datasets and applications in Ruby on Rails.
  • Have the flexibility to propose and implement your own ideas and solutions to challenging problems.
  • Interact with customers and end users to understand needs and how best to keep them engaged while using our products and services.
  • Own your career growth as far as your abilities, skills, and adaptability will take you while building a unique company that will produce the next generation of global engineers and business leaders.
Qualifications
  • You need to have VERY GOOD ENGLISH and communication skills and be an A PLAYER AMONG YOUR PEERS.
  • You need to be a quick learner, team player and quickly able to ramp up on our clients tech stack.
  • 5+ years experience of engineering and development experience with a focus on Ruby on Rails (RoR) Back-end or similar Back-end technologies to Ruby on Rails.
  • 1+ years of Vue.js experience or similar JavaScript frameworks.
Best regards,

Michael C. Bertoni - PhillyTech - Founder & CTO
Source Meridian - SVP-Business Development
mbertoni@phillytech.co
mobile: 215.817.3295

--
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/f2a926e7-0d0a-4280-a6a0-da8f0e13c2e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

pretty cool, I was using a jQuery based one and moved to stimulus, greatest choice I ever made I think:

--
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/8a2134b6-1b9d-452c-aa5d-6a7babd99e3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi! The look and feel does not depend on the gem, it just adds/removes some html (defined by the user) to/from an specific container when you click a button. The actual look depends on the form defined and styled by the user. I'll try to add a gif with an use example though, thanks!!

El jue., 11 abr. 2019 a las 11:53, Juan Ignacio Villarejo Arzivian (<arzivian87@gmail.com>) escribió:
Hey Ariel! 

Good initiative! I think it would really come handy a GIF image with a visual example of how it does. 
I suggest this because from the description I don't get how would it be the look and feel of the nested form. Of course cocoon has the same issue.
An image is a thousand words and a GIF is a thousand images. 

Congrats and keep it up. Removing JQuery dependency it's a great plus. 

On Wednesday, April 10, 2019 at 5:41:18 PM UTC-3, Ariel Juodziukynas wrote:

Hi, I want to share a gem that I'm working on.


https://github.com/arielj/vanilla-nested/



It's a replacement of the cocoon gem (dymanic nested forms) but using only vanilla javascript so no jQuery dependency. I'm already using it on one of my projects and it has a few config options to customize it for different requirements.


You can find some examples on theREADME at github (it's really similar to cocoon).


For now, it can only be added as a git repo (I'll see how I can publish it as a gem on rubygems).


gem 'vanilla_nested', git: 'https://github.com/arielj/vanilla-nested', branch: 'master'


I'd really really apreciate if you test it and can give me some feedback (ideally on github)!


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/f373ff8a-81d9-48b4-91ef-2cb5cb0632fb%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/CAPS3bcD-U%3D%3DEzNq4au0h6VZYfAfUBtCGZNb3ebV72e9YKQVCrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Very nice.



On Wednesday, April 10, 2019 at 4:41:18 PM UTC-4, Ariel Juodziukynas wrote:

Hi, I want to share a gem that I'm working on.


https://github.com/arielj/vanilla-nested/



It's a replacement of the cocoon gem (dymanic nested forms) but using only vanilla javascript so no jQuery dependency. I'm already using it on one of my projects and it has a few config options to customize it for different requirements.


You can find some examples on theREADME at github (it's really similar to cocoon).


For now, it can only be added as a git repo (I'll see how I can publish it as a gem on rubygems).


gem 'vanilla_nested', git: 'https://github.com/arielj/vanilla-nested', branch: 'master'


I'd really really apreciate if you test it and can give me some feedback (ideally on github)!


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/b60c0f1e-3865-4fb9-8600-105f672f55fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I even removed the dropdown hover jquery scripts.  I don't believe they work in mobile (responsive) mode.  lol



On Tuesday, April 9, 2019 at 9:17:56 AM UTC-4, Joe Guerra wrote:
Ok, I removed all the references to Ckeditor and I got the dropdown hover to work on the inital load.  {which is great}

But, on other pages, the hover doesn't work.  I've got to see exactly how I loaded it up.

On Monday, April 8, 2019 at 10:42:27 AM UTC-4, Joe Guerra wrote:
I'll try to run it in production mode.  I guess I'll need to install PostgreSQL on the development machine.

On Wednesday, April 3, 2019 at 8:53:17 PM UTC-4, Walter Lee Davis wrote:

> On Apr 3, 2019, at 8:05 PM, Joe Guerra <jgu...@jginfosys.com> wrote:
>
> my rails app is versio 5.0.7.
>
> I did change //= jquery  to //=jquery3 (and it loaded jquery 3.3.1 in the production environment on heroku).  
>
> so that wasn't the issue, it's just that my jquery scripts don't seem to run :(
>

One thing that I haven't heard about from you is whether they run in production mode anywhere else. Can you try running in production mode on your dev machine?

RAILS_ENV=production rake assets:precompile
RAILS_ENV=production rake db:migrate
rails s production

See if your scripts run okay there. If they do, then check that you are precompiling assets on your production server. (I am pretty sure that a heroku deploy will take care of all that automagically, but I haven't used it in several years, and I may have forgotten.)

If the problem was turbolinks, you would have seen that problem everywhere, in every environment. The usual way to fix that (if it's the reason) is to ensure that your scripts that run in the head of the page are properly listening for the turbolinks events, not page load, because the page load happens exactly once (when your first page loads) -- and never again -- in a turbolinks application. So anywhere you were using $.ready(), you would use $(document).on('turbolinks:load', function(evt){  /* your script here */ }); You can also just put any scripts that need access to the updated body in the very bottom of your layout, just inside the closing </body> tag.

Walter


> On Wednesday, April 3, 2019 at 11:40:38 AM UTC-4, jake wrote:
> I asked about the Rails version because these libs are incompatible with Rails 5+ https://github.com/jquery-ui-rails/jquery-ui-rails/issues/124#issuecomment-339689827
>
> Rails 5+ uses the webpacker gem to load JS.
>
> On Wed, Apr 3, 2019 at 10:25 AM Joe Guerra <JGu...@jginfosys.com> wrote:
> I have the following...
>
> gem 'jquery-rails', '~> 4.3', '>= 4.3.1'
> gem 'jquery-ui-rails', '~> 6.0', '>= 6.0.1'
>
> and I've looked at my heroku console, and did a gem list, it says I have the latest jquery stuff...
>
> jquery-rails (4.3.3)
> jquery-ui-rails (6.0.1)
>
> my gem.lock file is ok too.
>
> jquery-rails (4.3.3)
> jquery-ui-rails (6.0.1)
>
>
> Is there any way in the browser console (or debugger to figure out what's loading and when?)  
>
> I feel it's related to turbolinks again, lol, always seems to be an issue with turbolinks.
>
>
>
> On Wednesday, April 3, 2019 at 10:23:37 AM UTC-4, Brandon McClelland wrote:
> It sounds to me like something isn't nailed down to a specific version of jQuery so your latest dev builds just go grab whatever latest version they can find but your Production machine hasn't had to do this process in some time.
>
> In the Gemfile for the main Rails app I support, we have lines for
> gem 'jquery-rails'
> gem 'jquery-ui-rails'
> and this is what actually prepares the server running the app with some version of jQuery. You probably have something similar and that gem might need to be updated on your production server (or specified more narrowly in your Gemfile so your dev builds grab older versions of jQuery). You can check the Gemfile.lock for specific version ranges of whatever gem is responsible for your jQuery.
>
> If it's not a Gem that does this then you need to figure out how you got jQuery onto your production server, how it gets there on your dev machine builds, and how to stop your dev builds from grabbing a different version.
>
> On Tue, Apr 2, 2019 at 4:24 PM David Merrick <merri...@gmail.com> wrote:
> Have you checked your gem file and whats in application.js?
>
> On Wed, Apr 3, 2019 at 9:54 AM Joe Guerra <JGu...@jginfosys.com> wrote:
> No, that's in the gem file...
>
> I even tried adding the jquery right to the application.erb from the Jquery CND...
>
> <script
>     src="https://code.jquery.com/jquery-3.3.1.min.js"
>     integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
>     crossorigin="anonymous"></script>
>
> Still loads 1.12.4, no idea where it's getting it from.  (or why 3.3.1 isn't loading).
>
>
> On Tuesday, April 2, 2019 at 4:22:30 PM UTC-4, David Merrick wrote:
> Make sure you have the gem bootstrap sass could help
>
> On Wed, 3 Apr 2019 9:03 AM Joe Guerra <JGu...@jginfosys.com> wrote:
> ok, here's my application.js
>
> // This is a manifest file that'll be compiled into application.js, which will include all the files
> // listed below.
> //
> // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
> // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
> //
> // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
> // compiled file.
> //
> // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
> // about supported directives.
> //
> //= require jquery
> //= require jquery_ujs
> //= require turbolinks
> //= require bootstrap-sprockets
> //= require ckeditor/config
> //= require lightbox
> //= require rails.validations
> //= require rails.validations.simple_form
> //= require_tree .
>
>
> and here are my javascript files ...
>
> rw-r--r-- 1 joe joe    814 Apr  2 15:40 application.js
> -rw-r--r-- 1 joe joe   9353 Nov  6 19:39 bootstrap-dropdownhover.js
> -rw-r--r-- 1 joe joe   6787 Nov  6 19:39 bootstrap-dropdownhover.min.js
> -rw-r--r-- 1 joe joe   5425 Aug  9  2018 bootstrap-hover-dropdown.old
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 carts.coffee
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 categories.coffee
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 category.coffee
> drwxr-xr-x 2 joe joe   4096 Aug  9  2018 ckeditor
> -rw-r--r-- 1 joe joe    211 Oct 25 10:14 invoicing.coffee
> -rw-rw-r-- 1 joe joe  86927 Mar 29 14:52 jquery-3.3.1.min.js
> -rw-r--r-- 1 joe joe 253669 Aug  9  2018 jquery-ui.min.js
> -rw-r--r-- 1 joe joe     45 Aug  9  2018 js.coffee_old
> -rwxr-xr-x 1 joe joe  18410 Aug  9  2018 lightbox.js
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 notifications.coffee
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 pages.coffee
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 photos.coffee
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 products.coffee
> -rw-r--r-- 1 joe joe  22281 Nov  1 11:38 rails.validations.js
> -rw-r--r-- 1 joe joe   1831 Nov  1 11:38 rails.validations.simple_form.bootstrap4.js
> -rw-r--r-- 1 joe joe   1912 Nov  1 11:38 rails.validations.simple_form.js
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 transactions.coffee
> -rw-r--r-- 1 joe joe    211 Aug  9  2018 users.coffee
>
>
>
>
> On Friday, March 29, 2019 at 4:57:09 PM UTC-4, Brandon McClelland wrote:
> If your production server is serving JQuery make sure it's the correct version on that server. If source is from somewhere else make sure the Production server's code has the correct URL and double check your load order for all JS assets.
>
> On Fri, Mar 29, 2019 at 3:31 PM Joe Guerra <JGu...@jginfosys.com> wrote:
> I ran console.log(jQuery.fn.jquery);  
>
>
> (which checked the jquery version in the browsers console) and 3.3.1 on the development, 1.12.4 on the production.  I would imagine that's what's wrong, now why?
>
>
>
> On Friday, March 29, 2019 at 4:04:01 PM UTC-4, Joe Guerra wrote:
> ok, well I guess JQuery is not running on my production site, but seems to load and run locally...
>
>
> On Friday, March 29, 2019 at 3:56:29 PM UTC-4, Joe Guerra wrote:
> I got this dropdown hover script working on my local pc, unfortunately when push it to github and build it on heroku it doesn't work :(
>
> It's not a big deal, but it seems odd that's all.    I'll be replacing ckeditor with a nice jquery wysiwyg editor (so hoping that works too).
>
>
> --
> 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 rubyonra...@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/4483f5b0-1ca3-4394-bf81-c280a7d5cd8e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Brandon McClelland
> User Support Technician
> Steve Jackson Games
>
> --
> 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 rubyonra...@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/48dfb0dd-ad39-4214-aa79-f79cac5480e9%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 rubyonra...@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/d8979224-ceb6-49ee-b16d-5750fd94f387%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Dave Merrick
>
> TutorInvercargill
>
> http://tutorinvercargill.co.nz
>
> Daves Web Designs
>
> Website http://www.daveswebdesigns.co.nz
>
> Email merri...@gmail.com
>
> Ph   03 216 2053
>
> Cell 027 3089 169
>
> --
> 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 rubyonra...@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/CA%2B%3DMcKZAg%3D4pzvH95bbxZU3dgq3KX60MwT1V3HV7CrCcvJ1RdA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Brandon McClelland
> User Support Technician
> Steve Jackson Games
>
> --
> 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 rubyonra...@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/72a6f5bd-af25-4a76-a3ed-8a95686196bd%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 rubyonra...@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/5e2e4777-0d27-4326-8a69-f507b19d8cfb%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/2857d713-d09f-4d3c-94d5-e71be0e7aee3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hey Ariel! 

Good initiative! I think it would really come handy a GIF image with a visual example of how it does. 
I suggest this because from the description I don't get how would it be the look and feel of the nested form. Of course cocoon has the same issue.
An image is a thousand words and a GIF is a thousand images. 

Congrats and keep it up. Removing JQuery dependency it's a great plus. 

On Wednesday, April 10, 2019 at 5:41:18 PM UTC-3, Ariel Juodziukynas wrote:

Hi, I want to share a gem that I'm working on.


https://github.com/arielj/vanilla-nested/



It's a replacement of the cocoon gem (dymanic nested forms) but using only vanilla javascript so no jQuery dependency. I'm already using it on one of my projects and it has a few config options to customize it for different requirements.


You can find some examples on theREADME at github (it's really similar to cocoon).


For now, it can only be added as a git repo (I'll see how I can publish it as a gem on rubygems).


gem 'vanilla_nested', git: 'https://github.com/arielj/vanilla-nested', branch: 'master'


I'd really really apreciate if you test it and can give me some feedback (ideally on github)!


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/f373ff8a-81d9-48b4-91ef-2cb5cb0632fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, April 10, 2019

Hi, 

I get this error in Homebrew sometimes. I think it means it doesn't recognize you as a local user, not sure! 
This workflow for me always fixes it. Maybe it will help you figure out how to fix it using the MYSQL Community Server, they have similar issues:

$ mysql.server stop

// unset the tmp directory
$ echo $TMPDIR
$ unset TMPDIR
$ echo $TMPDIR

// validate this using echo then set it
$ echo mysqld -initialize --verbose --user=$(whoami) --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
$ mysqld -initialize --verbose --user=$(whoami) --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

$ mysql.server restart
$ mysql -u root -p

From there I access the mysql command line shell, set myself as root, run $flush privileges, exit mysql command line, run the login command, and error goes away


On Thu, Apr 11, 2019 at 1:20 AM Loganathan Sellappa <loganathan.ms@gmail.com> wrote:
Hi Everyone, 

I'm getting the below error randomly in my Ruby On Rails application whenever the number of requests increases to the server.


Mysql2::Error::ConnectionError (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)):

I'm not sure whether it is because of my server memory or is it something to do with mysql2 gem. Any help would be really appreciated, thanks in advance.

Ruby '2.5.0'  Rails '5.2.0  Mysql2 0.5.2  Phusion Passenger 5.3.4  Server version: Apache/2.4.6 (CentOS)  RAM SIZE: 1.5GB  MySQL Community Server (GPL): 5.6.41
Regards,
Loganathan

--
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/3f2416a7-1ba8-44c3-81e6-17384309af43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Sasha Boginsky
BBA Class of 2017
Emory Goizueta Business School
646.241.5756

--
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/CALD0ZKmN3Ysb5u78GKorbkRkoo_b7xjJobTv5m2A-UEybQ6rXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.