Re: Error when using memcached uninitialized constant Memcached (NameError)

2010-11-10 Thread joshmckin
Try Dalli. It works great and reduces your slug size 10 mb.

https://github.com/mperham/dalli



On Nov 10, 4:54 am, Alex Killough alexkillo...@gmail.com wrote:
 Hi, was there ever any resolution to this issue? I receive the same  
 errors shown below when trying to use memcached-northscale (as Oren  
 details) in my Rails 2.3.x and 3 projects.

 Thanks,
 Alex

 On Sep 11, 2010, at 4:16 AM, Henri Godron wrote:

  Hi Oren

  I tried the Gemfile with your suggestion:
  gem 'memcache'
  gem 'memcached-northscale', :require = 'memcached'

  Here is the error:
  == dyno-2143875.log (crash) ==
  /home/slugs/283964_c128375_5e65/mnt/.bundle/gems/ruby/1.8/gems/
  memcached-northscale-0.19.5.4/lib/memcached/memcached.rb:604:in  
  `check_return_code': Key {} (Memcached::Failure)
          from /home/slugs/283964_c128375_5e65/mnt/.bundle/gems/ruby/
  1.8/gems/memcached-northscale-0.19.5.4/lib/memcached/memcached.rb:
  638:in `set_credentials'
          from /home/slugs/283964_c128375_5e65/mnt/.bundle/gems/ruby/
  1.8/gems/memcached-northscale-0.19.5.4/lib/memcached/memcached.rb:
  143:in `initialize'
          from /home/slugs/283964_c128375_5e65/mnt/.bundle/gems/ruby/
  1.8/gems/memcached-northscale-0.19.5.4/lib/memcached/rails.rb:29:in  
  `initialize'

  I also tried to remove/add the addon to see if it was helping, but  
  without success.

  On Sat, Sep 11, 2010 at 2:30 AM, Oren Teich o...@heroku.com wrote:
  I missed the last d.

  gem memcached-northscale, :require = memcached

  On Fri, Sep 10, 2010 at 3:38 PM, riton enjoy...@gmail.com wrote:
  hi Oren,

  Thanks for looking into my issue. Here are the modifications I made to
  my app , according to the heroku documentation and what you just said.

  Please, can you tell me what's wrong in that:

  environment.rb: no changes. I don't have to add the 'config gem' and
  'require' lines
  environment/production.rb: added  config.cache_store
  = :mem_cache_store, Memcached::Rails.new
  Gemfile: gem memcached-northscale, :require = memcache

  Is that correct ? If no, do i need gem 'memcache' in my Gemfile ? I
  tried with it, and with gem 'memcached' but without success.

  I ran bundle install in my local installation, my gemfile.lock is in
  GIT and this is fine with heroku's bundle (it runs whenever I add a
  gem in Gemfile).

  Here are the gem used with bundle

   Using rake (0.8.7)
        Using abstract (1.0.0)
        Using activesupport (3.0.0.rc2)
        Using builder (2.1.2)
        Using i18n (0.4.1)
        Using activemodel (3.0.0.rc2)
        Using erubis (2.6.6)
        Using rack (1.2.1)
        Using rack-mount (0.6.13)
        Using rack-test (0.5.4)
        Using tzinfo (0.3.23)
        Using actionpack (3.0.0.rc2)
        Using mime-types (1.16)
        Using polyglot (0.3.1)
        Using treetop (1.4.8)
        Using mail (2.2.5)
        Using actionmailer (3.0.0.rc2)
        Using arel (1.0.1)
        Using activerecord (3.0.0.rc2)
        Using activeresource (3.0.0.rc2)
        Using memcache (1.2.13)
        Using memcached-northscale (0.19.5.4)
        Using mysql (2.8.1)
        Using mysql2 (0.2.3)
        Using bundler (1.0.0)
        Using thor (0.14.0)
        Using railties (3.0.0.rc2)
        Using rails (3.0.0.rc2)

  And the error:
  /disk1/home/slugs/283964_74b4131_849c/mnt/config/environments/
  production.rb:33: uninitialized constant Memcached (NameError)

  Sorry, I don't know what to do .

  On Sep 10, 5:54 pm, Oren Teich o...@heroku.com wrote:
   if you're using a gemfile, you don't want to have any config.gem  
  directives.
    It's one or the other.  Bundler replaces the way rails 2.3  
  handles gems.http://gembundler.com/rails23.html

   http://gembundler.com/rails23.htmlif oyu're using bundler, it's

   gem memcached-northscale, :require = memcache

   Oren

   On Fri, Sep 10, 2010 at 4:15 AM, riton enjoy...@gmail.com wrote:
Hello,

I added the memcache 5MB free addon to my application.
I'm trying to make it work using the northscale gem as specified  
  in
the documentation. I can't make it to work.

I can't get past this error  /production.rb:33: uninitialized  
  constant
Memcached (NameError)

Here is my Gemfile:

gem 'memcache-client'
gem 'memcached-northscale'

my environment.rb:

# Load memcached
config.gem 'memcached-northscale', :lib = 'memcached'
require 'memcached'

my production.rb:
config.cache_store = :mem_cache_store, Memcached::Rails.new

Despite your documentation saying to remove memcache-client from  
  the
Gemfile, (I tried..) some guys seem to say we need it (ex:

   http://github.com/heroku-examples/r3b4-memcache-heroku/commit/f10e62d
  ...
)

Well, I'm not sure what I should do. Here is an EVENT_ID i'm  
  getting
(sometime) on my app when trying to reach it (error 503), maybe  
  it's
related ?
Event ID: 05040001c8a60003714f

Thanks for helping me out !

--
You received this message 

can't push today, breaking on Configuring New Relic plugin step

2010-11-10 Thread marcel
I tried to push about 10 times over a period of about 2 hours this
morning. It keeps failing on the new relic step. Is this a temporary
heroku issue, or do I need to resolve some new relic issue?

- Heroku receiving push
- Rails app detected
- Gemfile detected, running Bundler version 1.0.3
   All dependencies are satisfied
- Installing Exceptional plugin from 
git://github.com/contrast/exceptional.git...
done.
- Installing quick_sendgrid plugin from 
git://github.com/pedro/quick_sendgrid.git...
done.
- Configuring New Relic plugin... ! Heroku push rejected due
to an unrecognized error. Please try again later.

error: hooks/pre-receive exited with error code 2

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: can't push today, breaking on Configuring New Relic plugin step

2010-11-10 Thread marcel
I talked with Heroku staff, and its a known bug with the newrelic
plugin. They are working on a fix, but the immediate solution is to
just remove the addon.

On Nov 10, 11:46 am, marcel mpoi...@gmail.com wrote:
 I tried to push about 10 times over a period of about 2 hours this
 morning. It keeps failing on the new relic step. Is this a temporary
 heroku issue, or do I need to resolve some new relic issue?

 - Heroku receiving push
 - Rails app detected
 - Gemfile detected, running Bundler version 1.0.3
        All dependencies are satisfied
 - Installing Exceptional plugin from 
 git://github.com/contrast/exceptional.git...
 done.
 - Installing quick_sendgrid plugin from 
 git://github.com/pedro/quick_sendgrid.git...
 done.
 - Configuring New Relic plugin... !     Heroku push rejected due
 to an unrecognized error. Please try again later.

 error: hooks/pre-receive exited with error code 2

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



automatic plugin installation seems counter to the bundler philosophy

2010-11-10 Thread marcel
I've been bitten twice now by addons whose automatic plugin
installation broke my app. The ease of installation is compelling, but
it seems more appropriate to just install a gem via bundler. If
special Heroku magic is needed, then provide a special gem, such as
heroku_newrelic or heroku_exeptional.

The whole point of bundler is that your app's dependencies won't just
change on you when you deploy. Yet a bunch of addons require last-
minute plugin installation, with no consent or warning if the plugin
has been updated.

Case 1:
I did some monkey patching for exceptional, so that I could filter
sensitive Heroku config keys out of the crash reports (AWS private
keys (!), and about a dozen others). It worked great, but then a few
weeks later I noticed my private API keys were back in the crash
reports. Sure enough, the exceptional plugin got updated and broke my
monkey patch.

Case 2:
I couldn't deploy today because the newrelic plugin got updated, which
broke the deploy process.


I think Heroku addons should move as much code as possible into
regular gems, and minimize (eliminate?) the deployment magic.

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: automatic plugin installation seems counter to the bundler philosophy

2010-11-10 Thread TJ Singleton

On Nov 10, 2010, at 3:29 PM, marcel wrote:

 I've been bitten twice now by addons whose automatic plugin
 installation broke my app. The ease of installation is compelling, but
 it seems more appropriate to just install a gem via bundler. If
 special Heroku magic is needed, then provide a special gem, such as
 heroku_newrelic or heroku_exeptional.

I also ran into an issue along these lines. My work around was to create empty 
directories in /vendor/plugins/newrelic_rpm.  Heroku assumed that the plugins 
where already  and did not try to install their version. Then I was able to add 
the newrelic gem to my Gemfile and load it how I wanted.

TJ Singleton
SalesCrunch.com

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



patron gem install issues

2010-11-10 Thread guillaume fradin
this error prevents me from deploying. Has any experienced this?

   Installing patron (0.4.10) with native extensions
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in
`build_extensions': ERROR: Failed to build gem native extension.
(Gem::Installer::ExtensionBuildError)

   /usr/ruby1.8.7/bin/ruby extconf.rb
   checking for curl-config... yes
   checking for rb_thread_blocking_region()... no
   creating Makefile

   make
   gcc -I. -I. -I/usr/ruby1.8.7/lib/ruby/1.8/x86_64-linux -I.  -fPIC -O2
-fno-strict-aliasing   -Wall  -c session_ext.c
   session_ext.c: In function ‘Init_session_ext’:
   session_ext.c:531: error: ‘CURLPROXY_HTTP_1_0’ undeclared (first use
in this function)
   session_ext.c:531: error: (Each undeclared identifier is reported
only once
   session_ext.c:531: error: for each function it appears in.)
   make: *** [session_ext.o] Error 1


   Gem files will remain installed in
/disk1/tmp/build_16496_23515118229180/.bundle/gems/ruby/1.8/gems/patron-0.4.10
for inspection.
   Results logged to
/disk1/tmp/build_16496_23515118229180/.bundle/gems/ruby/1.8/gems/patron-0.4.10/ext/patron/gem_make.out
from
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `each'
from
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in
`build_extensions'
from
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in `install'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/source.rb:100:in
`install'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/installer.rb:55:in
`run'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in
`each'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in
`each'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/installer.rb:44:in
`run'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/installer.rb:8:in
`install'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/cli.rb:221:in
`install'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in
`send'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in
`run'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/invocation.rb:118:in
`invoke_task'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor.rb:246:in
`dispatch'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/base.rb:389:in
`start'
from
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/bin/bundle:13
from /usr/ruby1.8.7/bin/bundle:19:in `load'
from /usr/ruby1.8.7/bin/bundle:19
   FAILED: http://docs.heroku.com/bundler
 ! Heroku push rejected, failed to install gems via Bundler

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: patron gem install issues

2010-11-10 Thread Dan Croak
I ran into the same thing earlier today. Solved it by switching to  
RestClient.


On Nov 10, 2010, at 6:38 PM, guillaume fradin guillaumefra...@googlemail.com 
 wrote:



this error prevents me from deploying. Has any experienced this?

   Installing patron (0.4.10) with native extensions /usr/ 
ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in  
`build_extensions': ERROR: Failed to build gem native extension.  
(Gem::Installer::ExtensionBuildError)


   /usr/ruby1.8.7/bin/ruby extconf.rb
   checking for curl-config... yes
   checking for rb_thread_blocking_region()... no
   creating Makefile

   make
   gcc -I. -I. -I/usr/ruby1.8.7/lib/ruby/1.8/x86_64-linux -I.  - 
fPIC -O2 -fno-strict-aliasing   -Wall  -c session_ext.c

   session_ext.c: In function ‘Init_session_ext’:
   session_ext.c:531: error: ‘CURLPROXY_HTTP_1_0’ undeclared  
(first use in this function)
   session_ext.c:531: error: (Each undeclared identifier is  
reported only once

   session_ext.c:531: error: for each function it appears in.)
   make: *** [session_ext.o] Error 1


   Gem files will remain installed in /disk1/tmp/ 
build_16496_23515118229180/.bundle/gems/ruby/1.8/gems/patron-0.4.10  
for inspection.
   Results logged to /disk1/tmp/ 
build_16496_23515118229180/.bundle/gems/ruby/1.8/gems/patron-0.4.10/ 
ext/patron/gem_make.out
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/ 
installer.rb:446:in `each'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/ 
installer.rb:446:in `build_extensions'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/ 
installer.rb:198:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/source.rb:100:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/installer.rb:55:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/installer.rb:44:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/installer.rb:8:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/cli.rb:221:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/vendor/thor/task.rb:22:in `send'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/ 
bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.3/bin/ 
bundle:13

from /usr/ruby1.8.7/bin/bundle:19:in `load'
from /usr/ruby1.8.7/bin/bundle:19
   FAILED: http://docs.heroku.com/bundler
 ! Heroku push rejected, failed to install gems via Bundler

--
You received this message because you are subscribed to the Google  
Groups Heroku group.

To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com 
.
For more options, visit this group at http://groups.google.com/group/heroku?hl=en 
.


--
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



After redeploy, my app still displays old index page

2010-11-10 Thread Mouli
Hi,

I deployed a site in Heroku few months back (url: http://pyaronweb.heroku.com)
where I just created static html pages in public folder of rails.

Yesterday, I redeployed a new version - updates include removal of
static html pages (including my index.html) and routing through
controllers.  In my routes.rb, I used 'root :to = home#index' (home
is my controller name with index method present in it.)

After my redeploying, my app still displays the old index page.  Just
checked if app was not deployed at all but I can see that it has been
deployed by manually visiting http://pyaronweb.heroku.com/home.

I could see the routing works properly in my dev environment by
visiting localhost:3000.  I run Rails 3.

Let me know if further info required.  Your help is greatly
appreciated.

- Mouli

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.