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