Skip to content

java -jar rails.war -S rake db:migrate (and some cleanup)#130

Closed
kares wants to merge 13 commits intojruby:masterfrom
kares:runnable
Closed

java -jar rails.war -S rake db:migrate (and some cleanup)#130
kares wants to merge 13 commits intojruby:masterfrom
kares:runnable

Conversation

@kares
Copy link
Member

@kares kares commented Dec 28, 2012

I was working on it almost a year ago and got it to a place where rake seems to work :

kares@theborg:~/workspace/github/jruby-rack/examples/rails32$ java -jar rails32.war -S rake -T
rake about              # List versions of all Rails frameworks and the env...
rake assets:clean       # Remove compiled assets
rake assets:precompile  # Compile all the assets named in config.assets.pre...
rake db:create          # Create the database from DATABASE_URL or config/d...
rake db:drop            # Drops the database using DATABASE_URL or the curr...
rake db:fixtures:load   # Load fixtures into the current environment's data...
rake db:migrate         # Migrate the database (options: VERSION=x, VERBOSE...
rake db:migrate:status  # Display status of migrations
rake db:rollback        # Rolls the schema back to the previous version (sp...
rake db:schema:dump     # Create a db/schema.rb file that can be portably u...
rake db:schema:load     # Load a schema.rb file into the database
rake db:seed            # Load the seed data from db/seeds.rb
rake db:setup           # Create the database, load the schema, and initial...
rake db:structure:dump  # Dump the database structure to db/structure.sql. ...
rake db:version         # Retrieves the current schema version number
rake doc:app            # Generate docs for the app -- also available doc:r...
rake log:clear          # Truncates all *.log files in log/ to zero bytes
rake middleware         # Prints out your Rack middleware stack
rake notes              # Enumerate all annotations (use notes:optimize, :f...
rake notes:custom       # Enumerate a custom annotation, specify with ANNOT...
rake rails:template     # Applies the template supplied by LOCATION=(/path/...
rake rails:update       # Update configs and some other initially generated...
rake routes             # Print out all defined routes in match order, with...
rake secret             # Generate a cryptographically secure secret key (t...
rake stats              # Report code statistics (KLOCs, etc) from the appl...
rake test               # Runs test:units, test:functionals, test:integrati...
rake test:recent        # Run tests for {:recent=>"test:prepare"} / Test re...
rake test:single        # Run tests for {:single=>"test:prepare"}
rake test:uncommitted   # Run tests for {:uncommitted=>"test:prepare"} / Te...
rake time:zones:all     # Displays all time zones, also available: time:zon...
rake tmp:clear          # Clear session, cache, and socket files from tmp/ ...
rake tmp:create         # Creates tmp directories for sessions, cache, sock...
kares@theborg:~/workspace/github/jruby-rack/examples/rails32$ java -jar rails32.war -S rake db:migrate
==  DeviseCreateUsers: migrating ==============================================
-- create_table(:users)
   -> 0.0200s
   -> 0 rows
-- add_index(:users, :email, {:unique=>true})
   -> 0.0050s
   -> 0 rows
-- add_index(:users, :reset_password_token, {:unique=>true})
   -> 0.0050s
   -> 0 rows
==  DeviseCreateUsers: migrated (0.0360s) =====================================

there seems to be more work required for rails c to work :

kares@theborg:~/workspace/github/jruby-rack/examples/rails32$ java -jar rails32.war -S rails console
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                                 # Default: file:/tmp/jruby7112847635427892118extract/lib/jruby-stdlib-1.7.1.jar!/META-INF/jruby.home/bin/jruby
...

I promised this on #128 thus here it is, hopefully others will find this useful even as is ...

@guilleiguaran
Copy link
Member

wow, this looks really great 👍

@kares
Copy link
Member Author

kares commented Dec 28, 2012

probably having warble runnable war and warble executable war is a bit confusing ...
runnable is a .war that might -S rake db:migrate while executable is runnable + the embed web server currently
... better names would be to use executable for what is now "runnable" and add a separate webserver feature

@ghost ghost assigned BanzaiMan Jan 29, 2013
@joshrendek
Copy link

Thanks Asarih for looking into it :)

BanzaiMan added a commit to BanzaiMan/warbler that referenced this pull request Jan 30, 2013
BanzaiMan added a commit that referenced this pull request Jan 30, 2013
BanzaiMan added a commit that referenced this pull request Jan 31, 2013
Conflicts:
	.gitignore
	Gemfile
	ext/JarMain.java
	spec/sample_war/Rakefile
@BanzaiMan
Copy link
Member

Those of you who are interested in this PR, please test ff10266 (you can check out the gh-130 branch on this repo) as a proof of concept. I will look into the PR in more detail in coming days, but I'd want some early feedback as the patch stands right now.

Thank you.

@BanzaiMan
Copy link
Member

I'm closing this one, since I opened #136. Please comment on that issue going forward.

@BanzaiMan BanzaiMan closed this Jan 31, 2013
BanzaiMan added a commit that referenced this pull request Feb 5, 2013
java -jar rails.war -S rake db:migrate
@amalagaura
Copy link

@kares I really appreciate the work on this. I had some ruby scripts to do this work and they were working ok, but did not work with the bundled git gems.

I am having a problem because I don't think the runnable is respecting:
config.webxml.jruby.compat.version

Can this be added please, I don't think it can be passed on the command line.

I am just going to make a new issue for this.

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.

6 participants