Hi Carson, I assume so - I don't work at Heroku or Northscale (providers of the Memcached addon) so I can't say for sure, but that sounds right :) Tack on the port 11211 (default memcached port) and you should be good to go.
-Jason On Sat, Dec 18, 2010 at 4:59 PM, Carson Gross <carsongr...@gmail.com> wrote: > Awesome, very informative. > > I see in my ENV hash the following entry: > > MEMCACHE_SERVER : mc2.ec2.northscale.net > > Is that the memcache server I should be using? > > I see I can get the app URL there as well, as you said, so I can use > that if memcache is running at that URL. > > Thanks! > > Cheers, > Carson > > On Dec 18, 11:38 am, Jason Morrison <jmorri...@thoughtbot.com> wrote: > > Hi Carson, > > > > Heroku exposes addon parameters as config vars, which are populated as > ENV > > vars available to your app: > > > > https://gist.github.com/597532192c16b13f4a2d > > > > Similarly, you can access ENV['APP_NAME'] to fetch the app name, and > > ENV['URL'] for the app base URL. Pop open `heroku console` and inspect > the > > ENV hash - a bunch of neat stuff in there. You can set the RAILS_ENV > with > > config vars, too: > http://docs.heroku.com/config-vars#rackenv-railsenv-merbenv > > > > Hope this helps, > > -Jason > > > > > > > > > > > > > > > > > > > > On Sat, Dec 18, 2010 at 9:59 AM, Carson Gross <carsongr...@gmail.com> > wrote: > > > Memcached/rube/rails/heroku newb. Apologies in advance. > > > > > The docs here:http://docs.heroku.com/memcachegive this for the > > > memcached config: > > > > > # Session cache > > > ActionController::Base.session = { > > > :namespace => 'sessions', > > > :expire_after => 20.minutes.to_i, > > > :memcache_server => ['server-1:11211', 'server-2:11211'], > > > :key => ..., > > > :secret => ... > > > } > > > > > require 'action_controller/session/dalli_store' > > > ActionController::Base.session_store = :dalli_store > > > > > First question: is 'server-1' our app url? ( > > > > > Second question: is there a way to get the name of the current app? > > > We run a few versions of our app (staging, production, and, obviously > > > locally on our own machines) and I obviously don't want them all going > > > to our production memcache instance. What's the orthodox way to > > > parameterized the server url, and then is there an orthodox way to > > > derive that from the environment? > > > > > Thanks, > > > Carson > > > > > -- > > > 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<heroku%2bunsubscr...@googlegroups.com> > <heroku%2bunsubscr...@googlegroups.com<heroku%252bunsubscr...@googlegroups.com> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/heroku?hl=en. > > > > -- > > Jason Morrison > > thoughtbot.com > > 585-216-5657 > > @jayunit > > -- > 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<heroku%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- Jason Morrison thoughtbot.com 585-216-5657 @jayunit -- 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.