Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add install template for quicker installation #2782

Merged
merged 1 commit into from
Oct 13, 2016
Merged

Conversation

mjgiarlo
Copy link
Member

@mjgiarlo mjgiarlo commented Oct 12, 2016

Using a template, and updating it within every release, allows us to simplify the instructions for developers who wish to get Sufia up and running in development mode very quickly. Also helps automate manual steps such as the inclusion of the flipflop gem from GitHub.

README and release management process have already been updated to reflect the new template.

Copy link
Contributor

@jcoyne jcoyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the commit message so there is no [WIP] messages. Would you mind squashing into one commit too?

@mjgiarlo
Copy link
Member Author

@jcoyne oops, yes. doing too many things and didn't push my change.

@elohanlon
Copy link
Contributor

elohanlon commented Oct 12, 2016

Looks like rails_command is only available in rails 5 and not in 4.2:

http://guides.rubyonrails.org/v4.2/rails_application_templates.html

Other commands look good though.

@mjgiarlo
Copy link
Member Author

Working on it. Thanks, @elo2112!

@elohanlon
Copy link
Contributor

elohanlon commented Oct 13, 2016

New changes look good, but I wanted to test the template to be sure. Encountered something strange.

This works (latest Rails 4 release):

rails _4.2.7.1_ new sufia_rails4 -m https://raw.githubusercontent.com/projecthydra/sufia/c3265630548baa4bda9164ff86d43bfd2e263300/template.rb

But this gives me some issues (latest Rails 5 release):

rails _5.0.0.1_ new sufia_rails5 -m https://raw.githubusercontent.com/projecthydra/sufia/c3265630548baa4bda9164ff86d43bfd2e263300/template.rb

The command above with Rails 5 ends up creating a massive number of processes on my computer:

$ ps ux | wc -l
692

(My baseline before running the command was around 160 processes.)

So many, in fact, that I can't create new ones:

$ ps ux | wc -l
-bash: fork: Resource temporarily unavailable

And I start seeing tons of repeating messages like this in my console:

E, [2016-10-12T22:44:45.737644 #32308] ERROR -- : fsevent: running worker failed: Resource temporarily unavailable - ~/.rvm/gems/ruby-2.3.0/gems/rb-fsevent-0.9.7/bin/fsevent_watch:~/.rvm/gems/ruby-2.3.0/gems/rb-fsevent-0.9.7/lib/rb-fsevent/fsevent.rb:106:in `popen'
~/.rvm/gems/ruby-2.3.0/gems/rb-fsevent-0.9.7/lib/rb-fsevent/fsevent.rb:106:in `open_pipe'
~/.rvm/gems/ruby-2.3.0/gems/rb-fsevent-0.9.7/lib/rb-fsevent/fsevent.rb:37:in `run'
~/.rvm/gems/ruby-2.3.0/gems/listen-3.0.8/lib/listen/adapter/darwin.rb:68:in `_run_worker'
~/.rvm/gems/ruby-2.3.0/gems/listen-3.0.8/lib/listen/adapter/darwin.rb:77:in `block (2 levels) in _run_workers_in_background'
~/.rvm/gems/ruby-2.3.0/gems/listen-3.0.8/lib/listen/internals/thread_pool.rb:6:in `block in add' called from: ~/.rvm/gems/ruby-2.3.0/gems/listen-3.0.8/lib/listen/adapter/darwin.rb:67:in `_run_worker'

That said, the template does eventually finish running. This is on Mac OS 10.11.6 with Ruby 2.3. The process count was much lower in the Rails 4 test, by several hundred. Is anyone else experiencing anything similar?

@jcoyne
Copy link
Contributor

jcoyne commented Oct 13, 2016

@elo2112 I think you're running into this issue with listen/rails: rails/rails#26158

@mjgiarlo
Copy link
Member Author

mjgiarlo commented Oct 13, 2016

@elo2112 Ha, @cgalarza ran into the same yesterday, and I added this to the Sufia Dev Guide: https://github.com/projecthydra/sufia/wiki/Sufia-Development-Guide#install-problems

I'm hesitant to amend the README to suggest using --skip-listen when generating a new Rails app, though, because that feels like a Rails concern rather than a Sufia concern, and folks should know what that argument does and whether they're OK with the consequences.

@elohanlon
Copy link
Contributor

@mjgiarlo Ah! Just caught up on yesterday's Slack chat and I see what you're referring to, thanks. All good with --skip-listen. PR looks good to me.

@elohanlon elohanlon merged commit 61ff7d1 into master Oct 13, 2016
@elohanlon elohanlon deleted the add_install_template branch October 13, 2016 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants