Comments (4)
Don't use redis with sinatra in default sinatra mode. You will have to use Sinatra::Application to contain your sintra apps to keep them from poluting the global namespace and fubaring redis.
from redis-rb.
Unfortunately I'm using a framework within a framework. My application is a subclass of Padrino::Application, which is a subclass of Sinatra::Application. The errors came within the padrino "controllers" which are simply instance_evals within the application class that call "get" and "delete". My redis#get and redis#delete calls are inside of these routing statements, which call methods in an instance of Usher::Interface::Rack::Builder, the routing code. Somehow the redis#get and redis#delete end up somewhere else.trying to call the Rack::Builder methods. I guess I'll stick with my get and delete patch to redis until I can spend enough time to figure out what ruby is doing when it tries to resolve these "get" and "delete" method calls.
from redis-rb.
I don't understand how this works. is sinatra defining 'get' and 'set' in the Kernel or Object namespace or something? If so thats pretty gross :( I'd rather not patch redis-rb to work around a sintra bug that should probabky be fixed in sinatra.
But perhaps we could add an extra file sinatra_safe.rb with your patches that allow you to require this if you really need it? Not sure whats best here
from redis-rb.
I don't understand it either. So I don't recommend doing anything to your code base until I find out the mechanism involved. It might be that I have to add "::" or something somewhere in my application code.
from redis-rb.
Related Issues (20)
- SORT_RO support HOT 1
- `ERR value is not an integer or out of range` after redis.ping HOT 4
- LMPOP not working HOT 5
- Unable to load application: TypeError: superclass mismatch for class Cluster HOT 7
- status
- Sentinel TLS: Sentinel TLS not supported HOT 5
- Configure Rails redis_cache_store with redis 5 HOT 1
- Unable to create redis cluster HOT 1
- Add support for redis Time Series module HOT 1
- OpenSSL::SSL::SSLError: SSL_write: unsupported method HOT 1
- Max number clients reached using subscribe_with_timeout HOT 2
- [Doc] Improve documentation about acceptable regular expressions pattern HOT 4
- Behavior of `pipelined { multi }` changed HOT 1
- 5.x seems to break IPv6 URL parsing HOT 1
- Redis::Cluster attempting Redis connection during asset precompilation HOT 5
- initialize': no implicit conversion of String into Integer (TypeError) HOT 1
- `:blpop` returns an exception when using sentinels HOT 3
- Proper documentation on how to setup rails to connect to a redis cluster for session management HOT 14
- redis-clustering: NoMethodError: undefined method `node_keys' for nil:NilClass HOT 1
- Use of RedisClient built-in connection pool HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-rb.