1 Building Phoenix on Windows
Lars Storjord edited this page 2015-05-03 21:45:49 +02:00
This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

To run the Phoenix PubSub tests from Phoenix.PubSub.PubSubTest on Windows, you first need to install Redis. Redis is an in-memory KV database, which unfortunately doesn't have official support for Windows. However, there is a working unofficial port that we can use.

First, grab a zip archive with the latest binaries from MSOpenTech/redis. Extract the executables from that archive to somewhere on your disk. Open your favorite command prompt in the same directory that you extracted the archive to, and run redis-server.exe. You may want to set the max heap size, using --maxheap 128M. When Redis is running successfully, you should see something like:

$ ./redis-server.exe  --maxheap 128M                                                   
                _._                                                                    
           _.-``__ ''-._                                                               
      _.-``    `.  `_.  ''-._           Redis 2.8.19 (00000000/0) 64 bit               
  .-`` .-```.  ```\/    _.,_ ''-._                                                     
 (    '      ,       .-`  | `,    )     Running in stand alone mode                    
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379                                     
 |    `-._   `._    /     _.-'    |     PID: 7592                                      
  `-._    `-._  `-./  _.-'    _.-'                                                     
 |`-._`-._    `-.__.-'    _.-'_.-'|                                                    
 |    `-._`-._        _.-'_.-'    |           http://redis.io                          
  `-._    `-._`-.__.-'_.-'    _.-'                                                     
 |`-._`-._    `-.__.-'    _.-'_.-'|                                                    
 |    `-._`-._        _.-'_.-'    |                                                    
  `-._    `-._`-.__.-'_.-'    _.-'                                                     
      `-._    `-.__.-'    _.-'                                                         
          `-._        _.-'                                                             
              `-.__.-'                                                                 
                                                                                       
[7592] 03 May 21:39:04.595 # Server started, Redis version 2.8.19                      
[7592] 03 May 21:39:04.595 * The server is now ready to accept connections on port 6379

You can then go ahead and run mix test, and the PubSub tests should be all green.


⚠️ NOTE: You may need to install Postgres as well, but Postgres comes with a Windows installer.