-
-
Notifications
You must be signed in to change notification settings - Fork 730
Development Environment Setup: Ubuntu
This guide will help you set up a development environment for OFN on Ubuntu (tested with Ubuntu 18, 19 and 20).
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
sudo apt-get install git postgresql-9.5 postgresql-common libpq-dev
In Ubuntu 18, you will need to replace python-software-properties
with software-properties-common
.
Also in Ubunut 18 and above, you can use psql 10 with sudo apt-get install git postgresql-10
In Ubuntu 20.04, to install postgreSQL-10 you need to add the repository/key before installing postgresql-10:
sudo add-apt-repository 'deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main'
sudo apt-get update
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get install postgresql-10
git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "[email protected]"
If you are on Ubuntu 18, you'll need to install the libssl1.0-dev
package first with:
sudo apt install libssl1.0-dev
If you are on Ubuntu 19 or 20, you'll need to update your apt sources in order to install libssl1.0-dev
and add the bionic-security source below. You can remove it from your sources again after installing libssl1.0-dev
.
- Open
/etc/apt/sources.list
in a text editor of your choice. - Append
deb http://security.ubuntu.com/ubuntu bionic-security main
to the end of the file - Run
sudo apt update && apt-cache policy libssl1.0-dev
- Run
sudo apt install libssl1.0-dev
Then you can follow the instructions from https://gorails.com/setup/ubuntu/14.04
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rbenv install 2.3.7
rbenv global 2.3.7
ruby -v
git clone https://github.com/nodenv/nodenv ~/.nodenv --depth 1
(cd ~/.nodenv && src/configure && make -C src)
echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(nodenv init -)"' >> ~/.bashrc
export PATH="$HOME/.nodenv/bin:$PATH"
eval "$(nodenv init -)"
git clone https://github.com/nodenv/node-build.git "$(nodenv root)/plugins/node-build" --depth 1
nodenv install 5.12.0
If you don't ever use docs for gems, you can disable installation of documentation with:
echo "gem: --no-document" >> ~/.gemrc
Now we can install some supporting gems:
gem install bundler
gem install zeus
Oct 2019: Newer installations of Ubuntu might come with Chromium installed via snap. As a result you may need to install Google Chrome and the Chrome Driver. If your tests run correctly without these steps, you may ignore them.
If you encounter an error such as Failure/Error: Capybara::Selenium::Driver .new(app, browser: :chrome, options: options) .tap { |driver| driver.browser.download_path = DownloadsHelper.path.to_s } NoMethodError: undefined method
strip' for nil:NilClass`, the following installation instructions should solve your issue:
curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add
sudo echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
In Ubuntu 20.04, you may need to run the 2nd command above like this instead:
sudo echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google-chrome.list
wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
Development environment setup
- Pipeline development process
- Bug severity
- Feature template (epic)
- Internationalisation (i18n)
- Dependency updates
Development
- Developer Guidelines
- The process of review, test, merge and deploy
- Making a great commit
- Making a great pull request
- Code Conventions
- Database migrations
- Testing and Rspec Tips
- Automated Testing Gotchas
- Rubocop
- Angular and OFN
- Feature toggles
- Stimulus and Turbo
Testing
- Testing process
- OFN Testing Documentation (Handbooks)
- Continuous Integration
- Parallelized test suite with knapsack
- Karma
Releasing
Specific features
Data and APIs
Instance-specific configuration
External services
Design