Re: [Rails] jquery drop down hover

2019-04-11 Thread Joe Guerra
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  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 
>>>  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  
>>> 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  
>>> wrote: 
>>> > Have you checked your gem file and whats in application.js? 
>>> > 
>>> > On Wed, Apr 3, 2019 at 9:54 AM Joe Guerra  
>>> wrote: 
>>> > No, that's in the gem file... 
>>> > 
>>> > I even tried adding the jquery right to the application.erb from the 
>>> Jquery CND... 
>>> > 
>>> > >> > src="

Re: [Rails] jquery drop down hover

2019-04-09 Thread Joe Guerra
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  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 
>>  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  
>> 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  
>> wrote: 
>> > Have you checked your gem file and whats in application.js? 
>> > 
>> > On Wed, Apr 3, 2019 at 9:54 AM Joe Guerra  
>> wrote: 
>> > No, that's in the gem file... 
>> > 
>> > I even tried adding the jquery right to the application.erb from the 
>> Jquery CND... 
>> > 
>> > > > src="https://code.jquery.com/jquery-3.3.1.min.js"; 
>> > integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" 
>> > crossorigin="anonymous"> 
>> > 
>> > Still loads 1.12.4, no idea where it's getting it from.  (or why 3.3.1 
>> isn't loading). 
>> > 
>> > 
>> > On Tuesday, 

Re: [Rails] jquery drop down hover

2019-04-08 Thread Joe Guerra
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  > 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 
>  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  
> 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  
> wrote: 
> > Have you checked your gem file and whats in application.js? 
> > 
> > On Wed, Apr 3, 2019 at 9:54 AM Joe Guerra  wrote: 
> > No, that's in the gem file... 
> > 
> > I even tried adding the jquery right to the application.erb from the 
> Jquery CND... 
> > 
> >  > src="https://code.jquery.com/jquery-3.3.1.min.js"; 
> > integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" 
> > crossorigin="anonymous"> 
> > 
> > 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  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, 
> 

Re: [Rails] jquery drop down hover

2019-04-03 Thread Walter Lee Davis


> On Apr 3, 2019, at 8:05 PM, Joe Guerra  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  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  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  wrote:
> Have you checked your gem file and whats in application.js?
> 
> On Wed, Apr 3, 2019 at 9:54 AM Joe Guerra  wrote:
> No, that's in the gem file...
> 
> I even tried adding the jquery right to the application.erb from the Jquery 
> CND...
> 
>  src="https://code.jquery.com/jquery-3.3.1.min.js";
> integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
> crossorigin="anonymous">
> 
> 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  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.
> //
> //=