Comments (5)
Oh interesting. I just forked master here, and got it working fine off mysql locally: https://github.com/staringispolite/TwitterHypeMan
Starting to think forking master may have been the wrong way to go about things? :)
(And yes, Heroku lets you add key/value pairs to the environment) Ruby gets at them via ENV[key]
from chatterbot.
Oops, fixed this but still unable to run on Heroku. This particular error was because of an incorrect Procfile. Should say something like
worker: bundle exec ruby mybot.rb
However, the script is still trying to configure itself over CLI, presumably because it's not connecting to the DB. Any advice on the best way to deploy to heroku would be helpful. I'm thinking my options are:
- Change the config loading logic to look for db_uri in the Heroku config vars
- Commit my YML file to a public repo (...dangerous to say the least)
from chatterbot.
FYI, the beta version of the gem doesn't support MySQL at all. For 1.0, can you specify environment variables for a Heroku instance? I think you can. If so, you could run the bot with something like:
CHATTERBOT_DB="mysql://foo" bundle exec ruby mybot.rb
I'm contemplating ways to add SQL support back, but it was a drag to support and made the configuration inflexible.
from chatterbot.
It depends on exactly what you need to do. If you're running your bot via the Streaming API, then you don't need to persist anything, and it should be fine running on Heroku. If you want to run it as a cron job, or if there's any data you need to store, then the master branch might not work too well for you.
I have a thought about how to handle the persistence problem, I'll see if I can get some code going in the next few days.
from chatterbot.
Cool! I ended up switching to the streaming API for the reasons you said just to get a working version up (great minds!)
@alexbaldwin and I added some config stuff for local vs heroku environments, so that I wouldn't have to push my Twitter key/secret/etc into my public git repo - happy to send a PR if you're interested.
I only wanted persistence so it wouldn't miss an @-mention. (Say, if I have downtime, or if Heroku sleeps the dyno). It seems like the streaming API would only send it @-mentions as they happen, so if it's down when a tweet happens, it'll never process that tweet. Not the biggest deal, but would be nice.
from chatterbot.
Related Issues (20)
- How do i even run this? The wiki did not help. I opened command prompt type in Ruby chatterbot-register.rb and it said its not a command HOT 1
- deprecation warning HOT 4
- Handle config writing if disk is full
- 401 when streaming. Oauth_timestamp? HOT 9
- chatterbot-register no such file or directory HOT 6
- chatterbot-register failures HOT 14
- chatterbot-register access_token and secret swapped. HOT 1
- replies block is not working HOT 4
- Attaching Pic to Tweet/Direct Message HOT 5
- Breaking out of nested direct_messages block HOT 3
- Search still showing retweets HOT 3
- Retween with comment HOT 2
- Twitter Automated Experiences HOT 1
- Place / Location for tweet or reply? HOT 1
- New to this, any ideas how to use the docker? HOT 4
- only_interact_with_followers not working HOT 1
- Reply Tweets must start with an @ mention HOT 1
- only_interact_with_following ? HOT 4
- Documentation fix HOT 3
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 chatterbot.