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
@danmaclean
Copy link
Author

@sbliven - alternative instructions

@sbliven
Copy link

sbliven commented Jul 17, 2013

  1. Change Gemfile to accept bundler >= 1.0.0 rather than ~> 1.0.0
  2. bundle install before rake so it installs missing dependencies
  3. Add gem install rails, or list as prereq
  4. Need to add gem path to Gemfile before line 12
    gem 'bio-foo', :path=>'/full/path/to/bioruby-foo'
  5. Add bundle exec rake gemspec before line 6, as well as instructions to remove TODO messages from gemspec
  6. Note line 8: package 'bio-foo', but repository 'bioruby-foo'

@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