Skip to content

Instantly share code, notes, and snippets.

@danmaclean
Last active December 19, 2015 21:39
Show Gist options
  • Save danmaclean/6021633 to your computer and use it in GitHub Desktop.
Save danmaclean/6021633 to your computer and use it in GitHub Desktop.
alternative instructions for getting app running
$ 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
@rjpbonnal
Copy link

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