Try to create bot LINE using Ruby on Rails
Feel free to use
- Ruby 2.6.4 (Updated from 2.6.1)
- Rails 5.2.3 (Updated from 5.2.2.1)
- PostgreSQL
-
Clone this repo
git clone https://github.com/lulu8879/cecelinebot.git
-
Create heroku app on Heroku or use Heroku CLI
heroku create your-app-name
-
Add
LINE_CHANNEL_SECRET
andLINE_CHANNEL_TOKEN
on Heroku Dashboard/Settings/Config Vars or use Heroku CLI, u can get them from LINE Developersheroku config:set LINE_CHANNEL_SECRET=your_secret heroku config:set LINE_CHANNEL_TOKEN=your_token
-
Push to heroku
git push heroku master
-
Migrate DB
heroku run rails db:create && heroku run rails db:migrate
-
Fill Webhook URL on LINE Developers
https://your-app-name.herokuapp.com/callback
-
Test it
-
Check current ruby version that being used
rvm list
-
Edit Gemfile or/and .ruby_version (if exists) and change the ver ruby
-
Change current version, ex: change to ver 2.6.4
rvm use 2.6.4
-
Update bundle and gem
bundle update