Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

<!-- /* GARELIC DATA */ --> was not gsub #5

Closed
huobazi opened this Issue Mar 19, 2013 · 7 comments

Comments

Projects
None yet
2 participants

huobazi commented Mar 19, 2013

ruby 2.0
rails 3.2.12

also with newrelic_rpm 3.5.8.72 enable enduser

<script type="text/javascript">
          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-xxxxx-x]);
          _gaq.push(['_setSiteSpeedSampleRate', 100]);

          _gaq.push(['_trackPageview']);

          <!-- /* GARELIC DATA */ -->

          (function() {
              var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
              ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
              var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
          })();
      </script>
Owner

jsuchal commented Mar 20, 2013

Hi, I have problem replicating this error. I've created a new rails 3.2.12 app under ruby 2.0 with newrelic_rpm 3.5.8.72 gem and everything works as expected.

Which server are you using? passenger/thin/unicorn ? Could you paste in your full Gemfile?

@jsuchal jsuchal was assigned Mar 20, 2013

huobazi commented Mar 21, 2013

Hi, my server is unicorn

source 'https://rubygems.org'
#source 'http://ruby.taobao.org'

gem 'rails', '~> 3.2.12'
gem 'pg', '~> 0.14.1

group :assets do
  gem 'sass-rails',   '~> 3.2.5'
  gem 'coffee-rails', '~> 3.2.2'
  gem 'uglifier', '~> 1.3.0'
  gem 'bootstrap-sass', '~> 2.2.2.0'
  gem "font-awesome-sass-rails", "~> 3.0.0.1"
  gem 'kaminari-bootstrap', '0.1.3'
  gem 'jquery_mobile_rails', '1.2.0'
end

gem "json", "~> 1.7.7"


# Sidekiq
gem "sidekiq", "~> 2.8.0"
gem 'slim'
gem 'sinatra', '>= 1.3.0', :require => nil

gem "rest-client", "~> 1.6.7"
gem "typhoeus", "~> 0.5.4"
gem "nokogiri", "~> 1.5.6"
gem 'jquery-rails', '~> 2.1.4'
gem 'bootstrap_helper', '~> 2.1.2'
gem 'client_side_validations', '~> 3.2.1'
gem 'simple_form', '~> 2.0.4'
gem 'client_side_validations-simple_form', '~> 2.0.1'

# Google Analytics performance 
gem "garelic", "~> 0.2.1"

# Newrelic Analytics 
gem "newrelic_rpm", "~> 3.5.8.72"

gem "rails-settings-cached", "~> 0.2.4"

gem 'kaminari', '~> 0.14.1'
gem 'cancan', '~> 1.6.8'
gem 'rails-i18n', '~> 0.7.2'

# Tagging
gem 'acts-as-taggable-on', '~> 2.3.3'

# To use ActiveModel has_secure_password
gem 'bcrypt-ruby', '~> 3.0.1'
gem 'ruby-pinyin', '~> 0.1.0'

#gem 'default_value_for', '~> 2.0.1'

# Cells
gem 'cells', '~> 3.8.8'

# For mobile devise
gem 'mobylette', '~> 3.3.2'


# For stack pages
gem "high_voltage", "~> 1.2.1"

# Use unicorn as the app server
gem "unicorn", "~> 4.6.2"

group :development do
  # Deploy with Mina 
  gem "mina", "~> 0.2.1"
  gem "god", "~> 0.13.1"
  gem 'pry', '~> 0.9.10'
  gem 'annotate', '~> 2.5.0'
  gem 'magic_encoding', '~> 0.0.2'
  gem 'web-app-theme', :git => 'git://github.com/pilu/web-app-theme.git' 
  gem "rails-erd", "~> 1.1.0"
end

group :development, :test do
  gem "rspec-rails", "~> 2.11.4"
end

group :test do
  gem 'factory_girl_rails'
  gem 'shoulda-matchers'
  gem 'capybara'
  gem 'launchy'
  gem 'database_cleaner'
  gem 'simplecov', require: false
end

Owner

jsuchal commented Mar 21, 2013

Hi, thanks! One quick question. Is this happening only in production or even in development environment?

huobazi commented Mar 21, 2013

in deveplopment the garelic is runing ok (use pow + powify)
in production the issue is happening (use nginx + unicorn)

huobazi commented Mar 25, 2013

@jsuchal

oh !!!
I got it !!!

when i stop the newrelic auto insert their javascript to my html body with newrelic.yml

browser_monitorning
    auto_instrument:  false

the Garelic works fine.

BTY: the Garelic 0.2.0 ( old code styles) also works fine with the newrelic browser_monitorning enabled.

Owner

jsuchal commented Mar 25, 2013

Cool, that's something I can debug. Thanks.

On Mon, Mar 25, 2013 at 8:04 PM, huobazi notifications@github.com wrote:

oh !!!
I got it !!!

when i stop the with newrelic.yml

browser_monitorning
auto_instrument: false···the Garelic works fine.


Reply to this email directly or view it on GitHubhttps://github.com/jsuchal/garelic/issues/5#issuecomment-15415229
.

Owner

jsuchal commented Jan 15, 2014

I'll close this since it's long overdue.

@jsuchal jsuchal closed this Jan 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment