Skip to content

Instantly share code, notes, and snippets.

@l15n
Last active May 22, 2018 16:45
Show Gist options
  • Save l15n/bebae5752d588f81487f to your computer and use it in GitHub Desktop.
Save l15n/bebae5752d588f81487f to your computer and use it in GitHub Desktop.
Rails and Jupyter
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"true"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rails_root = \"/Users/leonard-chin/src/ghe.ckpd.co/adtech/ads\"\n",
"FileUtils.cd rails_root\n",
"require './config/boot'\n",
"APP_PATH = File.expand_path('config/application') unless defined?(APP_PATH)\n",
"require APP_PATH\n",
"Rails.application.require_environment!"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"\"development\""
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Rails.env"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Ruby 2.2.3",
"language": "ruby",
"name": "ruby"
},
"language_info": {
"file_extension": "rb",
"mimetype": "application/x-ruby",
"name": "ruby",
"version": "2.2.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment