← Back to Upcase

Redis server from laptop gem

(João Daniel) #1


I’ve installed the laptop gem from thoughtbot in my development environment.

As stated on laptop README, it sets up a Redis server for me:

  • Redis for storing key-value data

I already had Redis installed before, and I used to launch it just by typing:

$ redis-server

Redis server was launched on-screen, and was kept running on bash until I interrupt it.

After I installed laptop, it seems that a Redis server was launched in background automatically, and I never had to launch it again.

However, I need to restart it, and I’m not aware about the correct way to do it. I could obviously kill the process and start a new one as I used to do before. But I would like to run it the same way laptop does, so I don’t run into different configuration files or instances.

How can I start|stop|restart redis-server the way laptop does?

(Chad Pytel) #2

Redis was installed with homebrew.

You can type in your terminal:

brew info redis

for information on how it’s started and how to start it.

(João Daniel) #3

Thanks for you answer Chad! I forgot to tell that I’m working on Ubuntu and not OS X. :smile:

(Daniel Collis-Puro) #4

Howdy! I maintain the ubuntu versions of the laptop script. It uses the package management built into the OS for installations, so if you already had redis-server installed our install command was a no-op. We don’t do anything special to your configuration files or daemons (check it out here).

You can restart redis using the normal tools built into ubuntu, so:

sudo /etc/init.d/redis-server restart

should do it. Cheers!

(Daniel Collis-Puro) #5

To clarify - it uses aptitude / dpkg for everything we possibly can, mostly libraries, basic dev tools and daemons. You’ll see ruby-build and rbenv, along with a couple other user-space or very simple manual installations. MOSTLY we’re using the OS-provided packages.

(João Daniel) #6

Hey Daniel! Thanks for your answer!

Actually I was mislead by some weird behaviour.

I came to the conclusion that the redis-server version that was running wasn’t the one I’ve installed because when I run:

sudo /etc/init.d/redis-server status

It said that redis-server was not running. However if I “ps grep” it, I can see it is running. Even If I stop and start as I used to do before (to assure that the running version is the one I’ve installed), the status command keeps saying it isn’t running, even when it is.

So laptop made no changes on my redis-server at all! :smile:

Thanks again for your answer! Cheers