ensemble at yale
1.0.0
该项目是在耶鲁大学数字人文实验室的前一阶段开发的。该实验室现在隶属于耶鲁大学图书馆计算方法和数据部门,不再将该项目纳入其工作范围。因此,它将不会收到进一步的更新。 Ensemble@Yale 是一个使用此代码的实时网站。当该网站出现故障时,将从网络上删除。
此应用程序需要 odler Ruby(例如 2.1.5,可通过 rvm 或 rbenv 获得)、最新的 Node.js 和 MongoDB。
# pull down source
git clone https://github.com/yaledhlab/ensemble-at-yale
# install dependencies
npm install
bundle install
# build the db
bundle exec rake project:load[ensemble-at-yale]
# install rvm
curl -sSL https://get.rvm.io | bash -s stable --ruby
# initialize rvm
source /home/ec2-user/.rvm/scripts/rvm
# install required ruby version
rvm install ruby-2.1.5
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 6.10.0
node -v
sudo touch /etc/yum.repos.d/mongodb-org-3.4.repo
sudo vim /etc/yum.repos.d/mongodb-org-3.4.repo
# paste the following:
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
sudo yum install -y mongodb-org
sudo service mongod start
sudo chkconfig mongod on
# bind to all ips
sudo vim /etc/mongod.conf
# change bindIp address to 0.0.0.0 (Update security in AWS accordingly)
sudo service mongod restart
# the mongolab uri is the path to your mongo port
export MONGOLAB_URI="mongodb://YOURDOMAIN.YOUREXTENSION:27017/YOURDBNAME"
# the keys below are long secure strings (e.g. rake secret)
export ENSEMBLE_DEVISE_SECRET_KEY=YOUR_LONG_STRING
export SECRET_KEY_BASE_TOKEN=YOUR_LONG_STRING
# the following are authentication keys for social media platforms
export FACEBOOK_ID=YOUR_FACEBOOK_INTEGER
export FACEBOOK_SECRET=YOUR_FACEBOOK_STRING
export GOOGLE_ID=YOUR_GOOGLE_STRING
export GOOGLE_SECRET=YOUR_GOOGLE_STRING
export TWITTER_KEY=YOUR_TWITTER_STRING
export TWITTER_SECRET=YOUR_TWITTER_STRING
要编译用于生产的新资产,可以运行:
rvmsudo rake assets:precompile RAILS_ENV=production
# fire up the server
rails s {{-e production}}
rvmsudo rails s -p 80 -e production