Giter VIP home page Giter VIP logo

orats's Introduction

This project has been deprecated in favor of docker-rails-example

Orats was a fun project that started as an elaborate Rails application template that eventually shifted into being a pre-configured app where Orats itself was a CLI tool to help personalize things like your app's name.

The initial release came out all the way back in February 2014.

It feels like it's time for a fresh start because moving forward I like the idea of having a pre-configured application that has a few opinions baked in, such as using Docker and more. That kind of means that orats as a name doesn't make sense since it's technically no longer a Rails application template.

With that said, I've started a new repo at docker-rails-example that picks up where orats left off while keeping everything current. As Rails continues to get updated this new repo will get updated too.

Thank you for using orats (and now this new repo)! Also, huge shout out to anyone who contributed to orats. Your efforts will not be forgotten. This repo is now archived which means it will remain available in read-only mode but not deleted.


Gem Version

What is orats?

It stands for opinionated rails application templates.

The goal is to provide you an excellent base application that you can use on your next Rails project.

You're meant to generate a project using orats and then build your custom application on top of it.

It also happens to use Docker so that your app can be ran on any major platform -- even without needing Ruby installed.

If you want to learn about Docker specifically then I recommend checking out Dive Into Docker: The Complete Docker Course for Developers.

What versions are you targeting?

Ruby 2.5+

Rails 5.2+

Docker 1.11+ / Docker Compose API v2+

Contents

Installation

gem install orats

Or if you already have orats then run gem update orats to upgrade to the latest version.

If you don't have Ruby installed, then you can generate an app easily with bash.

Commands

To get the details of each command then please run orats help from the terminal. Here's a high level overview:

New

The new command generates a new orats app, which is just a Rails app in the end.

Currently there is only 1 template, which is the "base" template but others may be added in the future.

Try the new command

orats new myproject

Templates

Return a list of available templates to choose from.

Try the templates command

orats templates

Available templates

Base

This is the starter template that every other template will be based upon. I feel like when I make a new project, 95% of the time it includes these features and when I do not want a specific thing it is much quicker to remove it than add it.

Main changes vs a fresh Rails project

  • Core changes:
    • Use postgres as the primary SQL database
    • Use redis as the cache backend
    • Use sidekiq as a background worker through Active Job
    • Use a standalone Action Cable server
    • jQuery is installed with jquery-rails
    • Capybara is commented out in the Gemfile
    • Bootsnap and Credentials are disabled
  • Features:
    • Add a pages controller with home action
  • Config:
    • Extract a bunch of configuration settings to environment variables
    • Rewrite the database.yml and secrets.yml files
    • Add a staging environment
    • Development mode only:
      • Use rack mini profiler for profiling / analysis
    • Production mode only:
      • Add popular file types to the assets pre-compile list
    • Log to STDOUT so that Docker can consume and deal with log entries
    • Change validation errors to output in-line on each element instead of a big list
  • Helpers:
    • title, meta_description, heading to easily set those values per view
    • humanize_boolean to convert true / false into Yes / No
    • css_for_boolean to convert true / false into a css class success / danger
  • Views:
    • Use scss and javascript
    • Use bootstrap 3.x and font-awesome 4.x
    • Add a minimal and modern layout file
    • Conditionally load html5shiv, json3 and respondjs for IE < 9 support
    • Partials:
      • Add navigation
      • Add flash message
      • Add footer
      • Add Google Analytics

FAQ

How can I learn about the Docker specific aspects of the project?

Check out the blog post Dockerize a Rails 5, Postgres, Redis, Sidekiq and Action Cable Application.

Another option is to take my Dive Into Docker course.

What do I do after I generate the application?

Start by reading the above blog post, because the Docker blog post explains how you can run the project. It also goes over a few Docker related caveats that may hang you up if you're not already familiar with Docker.

After that, just dive into the project's source code and write your awesome app!

What's the bare minimum to get things running?

If you don't feel like reading the blog post, this is the bare minimum to get everything up and running -- assuming you have Docker and Docker Compose installed.

# 1) Read the .env file carefully and change any user specific settings, such
#    as e-mail credentials and platform specific settings (check the comments).
#
# 2) Build and run the project with Docker Compose
docker-compose up --build
#
# 3) Reset and Migrate the database (run this in a 2nd Docker-enabled terminal)
# OSX / Windows users can skip adding the --user "$(id -u):$(id -g)" flag
docker-compose exec --user "$(id -u):$(id -g)" website rails db:reset
docker-compose exec --user "$(id -u):$(id -g)" website rails db:migrate
#
# 4a) Running Docker natively? Visit http://localhost:3000
# 4b) Running Docker with the Toolbox? Visit http://192.168.99.100:3000
#     (you may need to replace 192.168.99.100 with your Docker machine IP)

Do I need to install orats to use the base app?

Not really. The base application is already generated and you can view it directly in this repo.

The main benefit of the orats gem is that it will do a recursive find / replace on a few strings to personalize the project for your project's name. It will also make it easy to pick different templates when they are available.

You could easily do this yourself if you don't have Ruby installed on your work station. The 3 strings you'll want to replace are:

  • OratsBase (used as class names and in the generated home page)
  • orats_base (used for a number of Rails specific prefixes and more)
  • VERSION (used to set the current orats version in the generated home page)

You could whip up a simple bash script to do this, such as:

# Clone this repo to a directory of your choosing.
git clone https://github.com/nickjj/orats /tmp/orats

# Copy the base project to a directory of your choosing.
cp -r /tmp/orats/lib/orats/templates/base /tmp/foo_bar

# Swap a few custom values into the base project.
find /tmp/foo_bar -type f -exec sed -i -e 's/OratsBase/FooBar/g' {} \;
find /tmp/foo_bar -type f -exec sed -i -e 's/orats_base/foo_bar/g' {} \;
find /tmp/foo_bar -type f -exec sed -i -e 's/VERSION/5.2.0/g' {} \;

# Rename the example .env file since `.env` is git ignored.
mv /tmp/foo_bar/.env.example /tmp/foo_bar/.env

# Clean up the cloned directory.
rm -rf /tmp/orats

orats's People

Contributors

ericmedin avatar nickjj avatar olleolleolle avatar quintasan avatar tomdracz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orats's Issues

Custom Template

How can a new template can be created and be accessible by orats?

$orats templates

   templates  Add `-t TEMPLATE` to the new command to use a template

        base  dockerized production ready application

Updating gemfile, but the gem being installed is not changed

Hi,

I am attemting to change my gemfile from:

gem 'rspec-rails', '~> 3.6

to

gem 'rspec-rails', '~> 3.5', '>= 3.5.2'

I have removed everything such as the volumes and the cached images but nothing seems to work.

I am also running

docker-compose up --build

Could this be a bug?

Logging configuration dumps everything to STDOUT for test environment

The current logging configuration dumps everythingโ€”including SQL statementsโ€”to STDOUT, and test output is no longer that nice, clean string of dots.

What's the best way to configure the test environment to log to a file in log/test.log again, or clean up test output?

You can lock yourself out of being able to ssh into your server with v0.7.3

If you don't want to do these steps then I recommend using v0.7.2 if you still want the ansible functionality, otherwise just use v0.8.0.

The generated inventory will lock you out of your server because it never writes the rule to allow ssh connections from your IP (don't worry this is dynamically obtained at the start of every ansible run).

To get around this for now you need to do:

  • cd into your inventory directory
  • touch group_vars/app.yml
  • cd into your playbook directory
  • edit site.yml

In site.yml at line 25:

      ferm_input_list:
        - type: "dport_accept"
          dport: ["http", "https"]
  • Change ferm_input_list to ferm_input_group_list
  • Copy those 3 lines.
  • Delete lines 23-27 (there should be no trace of ferm in your app play)
  • Go back to your inventory directory
  • Edit group_vars/app.yml and paste in those 3 lines

Your app.yml should now look like this:


---
ferm_input_group_list:
  - type: "dport_accept"
    dport: ["http", "https"]
  • Login to your provider's control panel and gain access to your server
  • On your server... sudo nano /etc/ferm/filter-input.d/10_ansible_controller.conf

Edit 10_ansible_controller.conf to look like this:

# replace X.X.X.X with your work station's IP address.
protocol tcp dport ssh saddr X.X.X.X ACCEPT;
  • Save that file and sudo service ferm reload

You should now be able to perform an ansible playbook run, do a run with --tags common and you will be good to go.

Created a new project and psql connection fails

The DATABASE_URL within the .env file is using the role/user based on the project name. The POSTGRES_USER seems to be set as testo (which seems to be the actual user that has been created for the database)

This is causing a connection error unless the DATABASE_URL is changed to have the user as testo.

No .env file after Rails new

โฏ orats version
orats version 5.0.0
โฏ orats new myapp

        task  Check if path exists

        task  Check if template exists

        task  Create 'base' project
        path  myapp

        task  Prepare and run everything
        open  carefully read and edit the `.env` file
        move  cd myapp
         run  docker-compose up --build

        task  Initialize the database in a 2nd Docker-enabled terminal
        note  OSX / Windows users can skip the --user flag
         run  docker-compose exec --user "$(id -u):$(id -g)" website rails db:reset
         run  docker-compose exec --user "$(id -u):$(id -g)" website rails db:migrate

        task  Visit the page in your browser
       visit  Running Docker natively? http://localhost:3000
       visit  Running Docker with the Toolbox? http://192.168.99.100:3000
โฏ tree -a
.
โ”œโ”€โ”€ app
โ”‚ย ย  โ”œโ”€โ”€ assets
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ manifest.js
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ images
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ javascripts
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ application.js
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ cable.js
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ channels
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย      โ””โ”€โ”€ .keep
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ stylesheets
โ”‚ย ย  โ”‚ย ย      โ””โ”€โ”€ application.scss
โ”‚ย ย  โ”œโ”€โ”€ channels
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ application_cable
โ”‚ย ย  โ”‚ย ย      โ”œโ”€โ”€ channel.rb
โ”‚ย ย  โ”‚ย ย      โ””โ”€โ”€ connection.rb
โ”‚ย ย  โ”œโ”€โ”€ controllers
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ application_controller.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ concerns
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ pages_controller.rb
โ”‚ย ย  โ”œโ”€โ”€ helpers
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ application_helper.rb
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ pages_helper.rb
โ”‚ย ย  โ”œโ”€โ”€ jobs
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ application_job.rb
โ”‚ย ย  โ”œโ”€โ”€ mailers
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ application_mailer.rb
โ”‚ย ย  โ”œโ”€โ”€ models
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ application_record.rb
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ concerns
โ”‚ย ย  โ”‚ย ย      โ””โ”€โ”€ .keep
โ”‚ย ย  โ””โ”€โ”€ views
โ”‚ย ย      โ”œโ”€โ”€ layouts
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ application.html.erb
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ _flash.html.erb
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ _footer.html.erb
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ _google_analytics.html.erb
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ mailer.html.erb
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ mailer.text.erb
โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ _navigation.html.erb
โ”‚ย ย      โ””โ”€โ”€ pages
โ”‚ย ย          โ””โ”€โ”€ home.html.erb
โ”œโ”€โ”€ bin
โ”‚ย ย  โ”œโ”€โ”€ bundle
โ”‚ย ย  โ”œโ”€โ”€ rails
โ”‚ย ย  โ”œโ”€โ”€ rake
โ”‚ย ย  โ”œโ”€โ”€ setup
โ”‚ย ย  โ””โ”€โ”€ update
โ”œโ”€โ”€ cable
โ”‚ย ย  โ””โ”€โ”€ config.ru
โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ application.rb
โ”‚ย ย  โ”œโ”€โ”€ boot.rb
โ”‚ย ย  โ”œโ”€โ”€ cable.yml
โ”‚ย ย  โ”œโ”€โ”€ database.yml
โ”‚ย ย  โ”œโ”€โ”€ environment.rb
โ”‚ย ย  โ”œโ”€โ”€ environments
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ development.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ production.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ staging.rb
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ test.rb
โ”‚ย ย  โ”œโ”€โ”€ initializers
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ application_controller_renderer.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ assets.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ backtrace_silencers.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ cookies_serializer.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ filter_parameter_logging.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ inflections.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mime_types.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ new_framework_defaults.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ session_store.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ sidekiq.rb
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ timeout.rb
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ wrap_parameters.rb
โ”‚ย ย  โ”œโ”€โ”€ locales
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ en.yml
โ”‚ย ย  โ”œโ”€โ”€ puma.rb
โ”‚ย ย  โ”œโ”€โ”€ routes.rb
โ”‚ย ย  โ”œโ”€โ”€ secrets.yml
โ”‚ย ย  โ”œโ”€โ”€ sidekiq.yml.erb
โ”‚ย ย  โ””โ”€โ”€ spring.rb
โ”œโ”€โ”€ config.ru
โ”œโ”€โ”€ db
โ”‚ย ย  โ””โ”€โ”€ seeds.rb
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ .dockerignore
โ”œโ”€โ”€ Gemfile
โ”œโ”€โ”€ Gemfile.lock
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ lib
โ”‚ย ย  โ”œโ”€โ”€ assets
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ””โ”€โ”€ tasks
โ”‚ย ย      โ””โ”€โ”€ .keep
โ”œโ”€โ”€ log
โ”‚ย ย  โ””โ”€โ”€ .keep
โ”œโ”€โ”€ public
โ”‚ย ย  โ”œโ”€โ”€ 404.html
โ”‚ย ย  โ”œโ”€โ”€ 422.html
โ”‚ย ย  โ”œโ”€โ”€ 500.html
โ”‚ย ย  โ”œโ”€โ”€ apple-touch-icon.png
โ”‚ย ย  โ”œโ”€โ”€ apple-touch-icon-precomposed.png
โ”‚ย ย  โ”œโ”€โ”€ favicon.ico
โ”‚ย ย  โ””โ”€โ”€ robots.txt
โ”œโ”€โ”€ Rakefile
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ .rubocop.yml
โ”œโ”€โ”€ test
โ”‚ย ย  โ”œโ”€โ”€ controllers
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ .keep
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ pages_controller_test.rb
โ”‚ย ย  โ”œโ”€โ”€ fixtures
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ files
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ”œโ”€โ”€ helpers
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ”œโ”€โ”€ integration
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ”œโ”€โ”€ mailers
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ”œโ”€โ”€ models
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ .keep
โ”‚ย ย  โ””โ”€โ”€ test_helper.rb
โ”œโ”€โ”€ tmp
โ”‚ย ย  โ””โ”€โ”€ .keep
โ””โ”€โ”€ vendor
    โ””โ”€โ”€ assets
        โ”œโ”€โ”€ javascripts
        โ”‚ย ย  โ””โ”€โ”€ .keep
        โ””โ”€โ”€ stylesheets
            โ””โ”€โ”€ .keep

44 directories, 91 files

sidekiq not processing the default queue

I don't know if it's my fault or a configuration error but when I try to perform_async some worker, the job stays in the default queue without any other job before.
My .env:

PUMA_THREADS_MIN: 0
PUMA_THREADS_MAX: 16
PUMA_WORKERS: 4

SIDEKIQ_CONCURRENCY: 25

I haven't touch the sidekiq config file. If I go to the sidekiq dashboard I can see the job in the queue without any other job to process but doesn't start. What am I missing?

Thanks in advance.

pd: sorry if this is not orats related, I'm new with sidekiq.

Unable to run base application

Downloaded the orats/lib/orats/templates/base folder on my MacOSX
Created a .env file with the following line
COMPOSE_PROJECT_NAME=my_dockerized_app

Ran docker-compose up --build
docker-compose ps

       Name                         Command               State             Ports          

mydockerizedapp_cable_1 puma -p 28080 cable/config.ru Up 0.0.0.0:28080->28080/tcp
mydockerizedapp_postgres_1 docker-entrypoint.sh postgres Up 0.0.0.0:5432->5432/tcp
mydockerizedapp_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
mydockerizedapp_sidekiq_1 sidekiq -C config/sidekiq. ... Exit 1
mydockerizedapp_website_1 /bin/sh -c puma -C config/ ... Exit 1

I cannot Reset and Migrate the database (run this in a 2nd Docker-enabled terminal) as mydockerizedapp_website_1 container has exited!

docker-compose exec website rails db:reset
docker-compose exec website rails db:migrate

Nuking a path that is not a rails root directory won't delete the postgres databases

Since I introduced the concept of extra folders to separate your application and cookbooks you can't just simply point the nuke command to a non-rails app directory. It won't be able to run the rake db:drop:all command.

It will still delete the folder and delete the redis namespace but it will not delete the postgres databases.

For now you can just orats nuke app_name and if you supply the path to the rails application that you want to nuke it works as intended.

I'll implement a way for it to walk the app_path that you supplied to the nuke command and run the rake task on each child directory that happens to be a rails root directory.

Upcoming release for rails 4.2.0

Rails 4.2.0 will probably be out in a week or 2 from today. I just pushed a new version of Orats/master to prepare for this release, it is based on rc3.

The gist of the changes so far are:

  • Upgraded about a dozen gems to their latest version, including rails 4.2
  • Enable turbolinks progress bar by default
  • Add web-console gem for development mode
  • Use the universal google analytics snippet instead of the classic one
    • Make sure to check out app/views/layouts/google_analytics_snippet.html.erb
    • Check out this commit for details e6f7c3b

I won't push a new version of Orats until Rails 4.2 is shipped out but in the mean time if you want to spend the next week or so making new Rails 4.2 apps with Orats feel free to bundle install it like so:

gem 'orats', :git => 'https://github.com/nickjj/orats.git'

Rack times out out of the box on `stylesheet_link_tag` and `javascript_include_tag`

Hi,

Iย did things as simply as possible:

  • orats new my_project
  • docker-compose up --build
  • everything launches correctly
  • going to 0.0.0.0:3000

Then Iย got the following error:

Rack::Timeout::RequestTimeoutException in PagesController#home
Request ran for longer than 5000ms

The time out is on:

  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>

If I remove this line, I get the same error, but on the next line:

  <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>

If I also remove this line, it works, but of course, I have no CSS nor JS.

Am I missing something ? Help please :)

More informations:

screen shot 2016-09-13 at 15 50 59

My environment:

  • OS X 10.11.6
  • docker version 1.11.1, build 5604cbe
  • docker-compose version 1.7.1, build 0a9ab35

The full stack is:

sass (3.4.22) lib/sass/tree/visitors/base.rb:52:in `visit_children'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:169:in `block in visit_children'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:181:in `with_environment'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:168:in `visit_children'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `block in visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:400:in `visit_prop'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `block in visit'
sass (3.4.22) lib/sass/stack.rb:79:in `block in with_base'
sass (3.4.22) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.22) lib/sass/stack.rb:79:in `with_base'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `block (2 levels) in visit_rule'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `map'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `block in visit_rule'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:181:in `with_environment'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:431:in `visit_rule'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `block in visit'
sass (3.4.22) lib/sass/stack.rb:79:in `block in with_base'
sass (3.4.22) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.22) lib/sass/stack.rb:79:in `with_base'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `block (2 levels) in visit_rule'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `map'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:433:in `block in visit_rule'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:181:in `with_environment'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:431:in `visit_rule'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `block in visit'
sass (3.4.22) lib/sass/stack.rb:79:in `block in with_base'
sass (3.4.22) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.22) lib/sass/stack.rb:79:in `with_base'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:328:in `block (2 levels) in visit_import'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:328:in `map'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:328:in `block in visit_import'
sass (3.4.22) lib/sass/stack.rb:88:in `block in with_import'
sass (3.4.22) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.22) lib/sass/stack.rb:88:in `with_import'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:325:in `visit_import'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `block in visit'
sass (3.4.22) lib/sass/stack.rb:79:in `block in with_base'
sass (3.4.22) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.22) lib/sass/stack.rb:79:in `with_base'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:160:in `visit'
sass (3.4.22) lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
sass (3.4.22) lib/sass/tree/visitors/base.rb:52:in `map'
sass (3.4.22) lib/sass/tree/visitors/base.rb:52:in `visit_children'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:169:in `block in visit_children'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:181:in `with_environment'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:168:in `visit_children'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `block in visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:188:in `visit_root'
sass (3.4.22) lib/sass/tree/visitors/base.rb:36:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:159:in `visit'
sass (3.4.22) lib/sass/tree/visitors/perform.rb:8:in `visit'
sass (3.4.22) lib/sass/tree/root_node.rb:36:in `css_tree'
sass (3.4.22) lib/sass/tree/root_node.rb:20:in `render'
sass (3.4.22) lib/sass/engine.rb:281:in `render'
sass-rails (5.0.5) lib/sass/rails/template.rb:47:in `evaluate'
tilt (2.0.5) lib/tilt/template.rb:102:in `render'
sprockets (3.6.3) lib/sprockets/legacy_tilt_processor.rb:25:in `call'
sprockets (3.6.3) lib/sprockets/processor_utils.rb:75:in `call_processor'
sprockets (3.6.3) lib/sprockets/processor_utils.rb:57:in `block in call_processors'
sprockets (3.6.3) lib/sprockets/processor_utils.rb:56:in `reverse_each'
sprockets (3.6.3) lib/sprockets/processor_utils.rb:56:in `call_processors'
sprockets (3.6.3) lib/sprockets/loader.rb:134:in `load_from_unloaded'
sprockets (3.6.3) lib/sprockets/loader.rb:60:in `block in load'
sprockets (3.6.3) lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
sprockets (3.6.3) lib/sprockets/loader.rb:44:in `load'
sprockets (3.6.3) lib/sprockets/cached_environment.rb:20:in `block in initialize'
sprockets (3.6.3) lib/sprockets/cached_environment.rb:47:in `load'
sprockets (3.6.3) lib/sprockets/bundle.rb:23:in `block in call'
sprockets (3.6.3) lib/sprockets/utils.rb:196:in `dfs'
sprockets (3.6.3) lib/sprockets/bundle.rb:24:in `call'
sprockets (3.6.3) lib/sprockets/processor_utils.rb:75:in `call_processor'
sprockets (3.6.3) lib/sprockets/processor_utils.rb:57:in `block in call_processors'
sprockets (3.6.3) lib/sprockets/processor_utils.rb:56:in `reverse_each'
sprockets (3.6.3) lib/sprockets/processor_utils.rb:56:in `call_processors'
sprockets (3.6.3) lib/sprockets/loader.rb:134:in `load_from_unloaded'
sprockets (3.6.3) lib/sprockets/loader.rb:60:in `block in load'
sprockets (3.6.3) lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
sprockets (3.6.3) lib/sprockets/loader.rb:44:in `load'
sprockets (3.6.3) lib/sprockets/cached_environment.rb:20:in `block in initialize'
sprockets (3.6.3) lib/sprockets/cached_environment.rb:47:in `load'
sprockets (3.6.3) lib/sprockets/base.rb:66:in `find_asset'
sprockets (3.6.3) lib/sprockets/base.rb:92:in `[]'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:338:in `find_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:330:in `find_debug_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:212:in `block in lookup_debug_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:225:in `block in resolve_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:224:in `each'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:224:in `detect'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:224:in `resolve_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:211:in `lookup_debug_asset'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:153:in `block in stylesheet_link_tag'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:152:in `map'
sprockets-rails (3.1.1) lib/sprockets/rails/helper.rb:152:in `stylesheet_link_tag'
app/views/layouts/application.html.erb:12:in `_app_views_layouts_application_html_erb__2183925308731787587_69962785508040'
actionview (5.0.0) lib/action_view/template.rb:158:in `block in render'
activesupport (5.0.0) lib/active_support/notifications.rb:166:in `instrument'
actionview (5.0.0) lib/action_view/template.rb:348:in `instrument'
actionview (5.0.0) lib/action_view/template.rb:156:in `render'
rack-mini-profiler (0.10.1) lib/mini_profiler/profiling_methods.rb:102:in `block in profile_method'
actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:66:in `render_with_layout'
actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:14:in `render'
actionview (5.0.0) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionview (5.0.0) lib/action_view/renderer/renderer.rb:23:in `render'
actionview (5.0.0) lib/action_view/rendering.rb:103:in `_render_template'
actionpack (5.0.0) lib/action_controller/metal/streaming.rb:217:in `_render_template'
actionview (5.0.0) lib/action_view/rendering.rb:83:in `render_to_body'
actionpack (5.0.0) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (5.0.0) lib/action_controller/metal/renderers.rb:144:in `render_to_body'
actionpack (5.0.0) lib/abstract_controller/rendering.rb:26:in `render'
actionpack (5.0.0) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
activesupport (5.0.0) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/usr/local/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
activesupport (5.0.0) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
activerecord (5.0.0) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:43:in `render'
actionpack (5.0.0) lib/action_controller/metal/implicit_render.rb:36:in `default_render'
actionpack (5.0.0) lib/action_controller/metal/basic_implicit_render.rb:4:in `block in send_action'
actionpack (5.0.0) lib/action_controller/metal/basic_implicit_render.rb:4:in `tap'
actionpack (5.0.0) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
actionpack (5.0.0) lib/abstract_controller/base.rb:188:in `process_action'
actionpack (5.0.0) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.0.0) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (5.0.0) lib/active_support/callbacks.rb:126:in `call'
activesupport (5.0.0) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
activesupport (5.0.0) lib/active_support/callbacks.rb:455:in `call'
activesupport (5.0.0) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
activesupport (5.0.0) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
activesupport (5.0.0) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.0) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.0.0) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.0.0) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (5.0.0) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.0.0) lib/active_support/notifications.rb:164:in `instrument'
actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.0.0) lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
activerecord (5.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (5.0.0) lib/abstract_controller/base.rb:126:in `process'
actionview (5.0.0) lib/action_view/rendering.rb:30:in `process'
rack-mini-profiler (0.10.1) lib/mini_profiler/profiling_methods.rb:102:in `block in profile_method'
actionpack (5.0.0) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (5.0.0) lib/action_controller/metal.rb:262:in `dispatch'
actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (5.0.0) lib/action_dispatch/journey/router.rb:39:in `block in serve'
actionpack (5.0.0) lib/action_dispatch/journey/router.rb:26:in `each'
actionpack (5.0.0) lib/action_dispatch/journey/router.rb:26:in `serve'
actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:725:in `call'
rack (2.0.1) lib/rack/etag.rb:25:in `call'
rack (2.0.1) lib/rack/conditional_get.rb:25:in `call'
rack (2.0.1) lib/rack/head.rb:12:in `call'
rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context'
rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord (5.0.0) lib/active_record/migration.rb:552:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
activesupport (5.0.0) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
activesupport (5.0.0) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
activesupport (5.0.0) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.0) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
web-console (3.3.1) lib/web_console/middleware.rb:131:in `call_app'
web-console (3.3.1) lib/web_console/middleware.rb:20:in `block in call'
web-console (3.3.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.3.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.0) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.0) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.0) lib/active_support/tagged_logging.rb:70:in `block in tagged'
activesupport (5.0.0) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.0) lib/active_support/tagged_logging.rb:70:in `tagged'
railties (5.0.0) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.1.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.1) lib/rack/method_override.rb:22:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call'
rack-timeout (0.4.2) lib/rack/timeout/core.rb:122:in `block in call'
rack-timeout (0.4.2) lib/rack/timeout/support/timeout.rb:19:in `timeout'
rack-timeout (0.4.2) lib/rack/timeout/core.rb:121:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
rack-mini-profiler (0.10.1) lib/mini_profiler/profiler.rb:278:in `call'
railties (5.0.0) lib/rails/engine.rb:522:in `call'
puma (3.4.0) lib/puma/configuration.rb:224:in `call'
puma (3.4.0) lib/puma/server.rb:569:in `handle_request'
puma (3.4.0) lib/puma/server.rb:406:in `process_client'
puma (3.4.0) lib/puma/server.rb:271:in `block in run'
puma (3.4.0) lib/puma/thread_pool.rb:114:in `block in spawn_thread'

ENV not being set to expected values

Hi there,

I just started using orats, great project, thanks for the hard work!

I was trying to install rspec and was wondering why my RAILS_ENV were being set to development when running tests.

I actually think that it is running in test, but when the dependencies that are being defined in groups within the gemfile, its still set to development such as:

group :test do
  gem 'shoulda-matchers', '~> 3.1'
end

then when I try to run a test with shoulda matchers, it says "Shoulda" is undefined, because the env that is being used is development.

Any help on this would be greatly appreciated. Thanks!

I can't get rspec to run

Hi,

I've just installed a new rails project with orats using version 5.1.1 (thank you). However I keep getting an error when I attempt to run the test suite, I've installed RSpec as normal and added a simple test spec. I've tried modifying this a few times with no luck, heres the error:

An error occurred while loading ./spec/features/test_spec.rb.
Failure/Error: require File.expand_path('../../config/environment', __FILE__)

LoadError:
  cannot load such file -- /app/spec/config/environment
# /usr/local/bundle/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
# /usr/local/bundle/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
# /usr/local/bundle/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
# /usr/local/bundle/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
# ./spec/support/database_cleaner.rb:3:in `<top (required)>'
# /usr/local/bundle/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
# /usr/local/bundle/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
# /usr/local/bundle/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
# /usr/local/bundle/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
# ./spec/rails_helper.rb:9:in `block in <top (required)>'
# ./spec/rails_helper.rb:9:in `each'
# ./spec/rails_helper.rb:9:in `<top (required)>'
# ./spec/features/test_spec.rb:1:in `<top (required)>'

Below is the gemfile I'm using:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
  "https://github.com/#{repo_name}.git"
end

gem 'rails', '~> 5.1.1'
gem 'puma', '~> 3.9'
gem 'rack-timeout', '~> 0.4'
gem 'jbuilder', '~> 2.5'
gem 'pg', '~> 0.21'
gem 'redis-rails', '~> 5.0'
gem 'sidekiq', '~> 5.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails', '~> 4.3'
gem 'turbolinks', '~> 5'
gem 'font-awesome-rails', '~> 4.7'
gem 'foundation-rails', '~> 6.3', '>= 6.3.1.0'
gem 'simple_form', '~> 3.5'
gem 'devise', '~> 4.3'
gem 'pundit', '~> 1.1'
# gem 'clockwork', '~> 2.0'
# gem 'kaminari', '~> 0.17'

group :development, :test do
  gem 'byebug', platform: :mri
  gem 'rspec-rails', '~> 3.6'
  gem 'capybara', '~> 2.14'
  gem 'selenium-webdriver'
  gem 'factory_girl_rails', '~> 4.8'
  gem 'reek', '~> 4.7', '>= 4.7.1'
end

group :development do
  gem 'rack-mini-profiler', '~> 0.10'
  gem 'web-console', '~> 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

group :test do
  gem 'database_cleaner', '~> 1.6', '>= 1.6.1'
  gem 'shoulda-matchers', '~> 3.1', '>= 3.1.1'
  gem 'faker', '~> 1.7', '>= 1.7.3'
  # gem "simplecov"
  # gem "codeclimate-test-reporter", "~> 1.0.0"
end

gem 'tzinfo-data'

The puma restart_command might be incorrect, potential solution is here

I don't want to make a release for this fix alone but you may need to change this in config/puma.rb in order to get puma to reload (USR2) correctly. It's already fixed in master and will be in v0.9.3.

For now you can change:
restart_command 'bundle exec puma'

To:
restart_command 'bin/puma'

I am deploying to a self compiled version of ruby (no manager) and bin/puma works correctly.

The ansible nginx role never reloads its config

If you have been getting the nginx welcome page after deploying it's because the nginx role wasn't properly reloading its config so the rails upstream was never being noticed.

I patched the ansible role with the fix but orats v0.6.4 will still download the old role.

You can force an upgrade by running: ansible-galaxy install --force nickjj.nginx after you generate an orats project for a temporary fix.

It's fixed on master and will be fixed in the next build, you won't have to run that command in v0.6.5+.

Right way of installing a new gem

Hey,
everytime I added a new gem to my Gemfile and ran docker-compose exec website bundle install I get the following error for the cable and sidekiq containers:

Your bundle is locked to bcrypt (3.1.11), but that version could not be found in any of the sources listed in your Gemfile.

The Gemfile and Gemfile.lock are shared between website, cable and sidekiq containers while all gems are installed separately on each container.
So I have to bundle install three times, one for each container to get rid of the error messages.

Is there a better way than this? Maybe one solution would be to also share all installed gems between the containers or?

kind regards,
Yannick

Rack Timeout Causes Issues on OSX

I've running Docker 1.13 on El Capitan and when I attempt to load any page it gets a Timeout error. I've disabled rack_timeout on all of my projects and I don't have any timeout errors any more. It would be nice to add a flag to exclude it from a new build.

ERROR: "orats project" was called with arguments ["myauthapp", "--auth"]

I'm having problems using the auth template. I'm using the example provided in the readme:

orats project myauthapp --auth -pg-password foo --skip-galaxy

And getting this error:

ERROR: "orats project" was called with arguments ["myauthapp", "--auth"]
Usage: "orats project TARGET_PATH [options] -p, --pg-password=PG_PASSWORD"

Thanks in advance.

Postgres and redis volumes should be localised to app

in the docker-compose file volumes are set like this:

- 'postgres:/var/lib/postgresql/data'

But I think they should be set like this:

- './postgres:/var/lib/postgresql/data'

This localizes the folder to the project itself, and it should be ignored in the git file

deploy on gcp

Hi,

I'm trying to deploy a orats base template on google cloud and I'm getting, some weird errors due to docker/docker-compose/kubernetes can you provide any material on kubernetes or deploying a docker-compose?

Thanks

Base App Template produces an error

I used the batch script from the readme to clone in and create a new app template but when I run docker compose the website, sidekiq, and cable images produces this error:
/app/config/initializers/timeout.rb:1:in '<top (required)>': undefined method 'timeout=' for Rack::Timeout:Class (NoMethodError)

It seems this method was dropped in the newer version of rack-timeout zombocom/rack-timeout#130

Not sure what method you would prefer but as it stands it seems either rack-timeout needs to be downgraded to 0.4.* or the offending code updated for the newer syntax

msg: /usr/local/rvm/scripts/set: line 19: exec: bundle: not found

I'm getting the next error using the playbook:

TASK: [nickjj.pumacorn | ensure pumacorn starts on a fresh reboot] ************ 
<107.170.201.218> ESTABLISH CONNECTION FOR USER: deployer
<107.170.201.218> REMOTE_MODULE service name=myapp state=started enabled=yes
<107.170.201.218> EXEC ['sshpass', '-d8', 'ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/pacuna/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'GSSAPIAuthentication=no', '-o', 'PubkeyAuthentication=no', '-o', 'User=deployer', '-o', 'ConnectTimeout=10', '107.170.201.218', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1403651816.59-42859357481591 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1403651816.59-42859357481591 && echo $HOME/.ansible/tmp/ansible-tmp-1403651816.59-42859357481591'"]
<107.170.201.218> PUT /tmp/tmpWUjBXm TO /home/deployer/.ansible/tmp/ansible-tmp-1403651816.59-42859357481591/service
<107.170.201.218> EXEC ['sshpass', '-d8', 'ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/pacuna/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'GSSAPIAuthentication=no', '-o', 'PubkeyAuthentication=no', '-o', 'User=deployer', '-o', 'ConnectTimeout=10', '107.170.201.218', u'/bin/sh -c \'sudo -k && sudo -H -S -p "[sudo via ansible, key=toerzndmimjybpgtnybjeryiaaqgmvwd] password: " -u root /bin/sh -c \'"\'"\'echo SUDO-SUCCESS-toerzndmimjybpgtnybjeryiaaqgmvwd; LC_CTYPE=C LANG=C /usr/bin/python /home/deployer/.ansible/tmp/ansible-tmp-1403651816.59-42859357481591/service; rm -rf /home/deployer/.ansible/tmp/ansible-tmp-1403651816.59-42859357481591/ >/dev/null 2>&1\'"\'"\'\'']
failed: [107.170.201.218] => {"failed": true}
msg: /usr/local/rvm/scripts/set: line 19: exec: bundle: not found


FATAL: all hosts have already failed -- aborting

Thanks in advance!!

Add additional templates

I think bootstrap and other style type gems (maybe font-awesome) should be removed from the base, and a couple of other templates added such as:

  • bootstrap
  • Foundation
  • React
  • API only (would be great)

Environment variables not being recognized

I solved this installing the dotenv gem.

I think is a good practice to put dotenv in the Gemfile, however, if your intention was to create something gem-agnostic to load environment variables (allowing the user to choose from Figaro or Dotenv), it would be great to add a section in the README indicating that.

So far, so good. Thank you, again, for reducing the boilerplate (and a great documentation to understand the why's configuring the project) ๐Ÿบ.

New Rails app - Puma config not found

I just created a new Rails application with this gem, then runned docker-compose up --build.

Log:

website_1   | /usr/local/bundle/gems/puma-3.11.2/lib/puma/dsl.rb:41:in `read': No such file or directory @ rb_sysopen - config/puma.rb (Errno::ENOENT)
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/lib/puma/dsl.rb:41:in `_load_from'
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/lib/puma/configuration.rb:192:in `block in load'
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/lib/puma/configuration.rb:192:in `each'
cable_1     | ERROR: No application configured, nothing to run
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/lib/puma/configuration.rb:192:in `load'
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/lib/puma/launcher.rb:59:in `initialize'
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/lib/puma/cli.rb:68:in `new'
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/lib/puma/cli.rb:68:in `initialize'
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/bin/puma:8:in `new'
website_1   | 	from /usr/local/bundle/gems/puma-3.11.2/bin/puma:8:in `<top (required)>'
website_1   | 	from /usr/local/bundle/bin/puma:23:in `load'
website_1   | 	from /usr/local/bundle/bin/puma:23:in `<main>'
cable_1     | Puma starting in single mode...
cable_1     | * Version 3.11.2 (ruby 2.4.3-p205), codename: Love Song
cable_1     | * Min threads: 0, max threads: 16
cable_1     | * Environment: development
sidekiq_1   | 2018-02-19T03:02:18.016Z 1 TID-gtbg1z3z5 INFO: ==================================================================
sidekiq_1   | 2018-02-19T03:02:18.016Z 1 TID-gtbg1z3z5 INFO:   Please point sidekiq to a Rails 4/5 application or a Ruby file
sidekiq_1   | 2018-02-19T03:02:18.016Z 1 TID-gtbg1z3z5 INFO:   to load your worker classes with -r [DIR|FILE].
sidekiq_1   | 2018-02-19T03:02:18.016Z 1 TID-gtbg1z3z5 INFO: ==================================================================
sidekiq_1   | 2018-02-19T03:02:18.016Z 1 TID-gtbg1z3z5 INFO: sidekiq [options]
sidekiq_1   |     -c, --concurrency INT            processor threads to use
sidekiq_1   |     -d, --daemon                     Daemonize process
sidekiq_1   |     -e, --environment ENV            Application environment
sidekiq_1   |     -g, --tag TAG                    Process tag for procline
sidekiq_1   |     -i, --index INT                  unique process index on this machine
sidekiq_1   |     -q, --queue QUEUE[,WEIGHT]       Queues to process with optional weights
sidekiq_1   |     -r, --require [PATH|DIR]         Location of Rails application with workers or file to require
sidekiq_1   |     -t, --timeout NUM                Shutdown timeout
sidekiq_1   |     -v, --verbose                    Print more verbose output
sidekiq_1   |     -C, --config PATH                path to YAML config file
sidekiq_1   |     -L, --logfile PATH               path to writable logfile
sidekiq_1   |     -P, --pidfile PATH               path to pidfile
sidekiq_1   |     -V, --version                    Print version and exit
sidekiq_1   |     -h, --help                       Show help
sidekiq_1   |
twitalytics_website_1 exited with code 1
twitalytics_sidekiq_1 exited with code 1
twitalytics_cable_1 exited with code 1

Update rails to 5.0.2

I believe there is an issue with version 5.0.1 installing nokogiri version 1.6.8.1 with vulnerabilities

Would Lograge for STDOUT logging be most appropriate?

This puts the whole log message, or query, on a single line.

I've used this for docker, since it also works super well with third party logging software - i.e. easy to parse.

  1. Have you used it?
  2. Do you think it could be a better default than just basic rails logging with STDOUT?

Webpacker support

I've got webpacker working nicely on Docker/Docker Compose.
https://github.com/archonic/webpacker-docker

The only non-obvious solution I needed was setting WEBPACKER_DEV_SERVER_HOST=webpack in the env file, where webpack is the name of the webpack service. That gets Rails to be aware of the already running webpack-dev-server and stop compiling already compiled files on refresh.

I don't really have an opinion on including this in orats, but I figure people might want to know how it could be done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.