Last active
December 19, 2015 21:39
-
-
Save danmaclean/6021633 to your computer and use it in GitHub Desktop.
alternative instructions for getting app running
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ biogem --with-engine Foo foo | |
$ cd bioruby-foo | |
$ rake version:write | |
update gemfile to specify new version of bundler | |
$ bundle install | |
Note: a database is automatically configure for the newly created gem | |
$ cd ../ | |
$ rails new Webfoo | |
$ add `gem 'bio-foo', :path=>'path_gem_dir' ` into Rails application Gemfile the newly created gem: | |
$ cd Webfoo | |
$(maybe also: bundle exec rake gemspec, then update gem's gemspec file where marked TODO:) | |
$ bundle install | |
Enable the route for the added gem (in biouby-foo/config/routes.rb) uncomment: | |
yourPathToTheControllerFiles = "/" | |
controllerName = :foos | |
#otherControllerName = :samples | |
#--- | |
scope mount_at, yourPathToTheControllerFiles do | |
resources controllerName do | |
member do | |
get :example | |
end | |
end | |
# resources otherControllerName, :only =>[:index, :show] | |
end #scope | |
In bioruby-foo/lib/bio/foo/example.rb be sure the example class is uncommented: | |
module Bio | |
module Foo | |
class Example < DummyConn | |
end | |
end | |
end | |
in bioruby-foo find all instances of Foo in Foo_controller, folder and file names, views etc and change to name of gem | |
uncomment contents of db/migrate/001_create_example.rb | |
cd bioruby-foo | |
bundle exec rake db:create | |
bundle exec rake db:migrate |
- Change Gemfile to accept
bundler >= 1.0.0
rather than~> 1.0.0
bundle install
beforerake
so it installs missing dependencies- Add
gem install rails
, or list as prereq - Need to add gem path to Gemfile before line 12
gem 'bio-foo', :path=>'/full/path/to/bioruby-foo' - Add
bundle exec rake gemspec
before line 6, as well as instructions to remove TODO messages from gemspec - Note line 8: package 'bio-foo', but repository 'bioruby-foo'
Thanks I'll update docs and implementation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@sbliven - alternative instructions