Comments (5)
I wonder if a workaround is to have an option to generate a .rb file that can act as a script? Since obviously all users would have Ruby installed, that would normalize the environment. You could have an option to output 'schema_to_scaffold.rb' in the root of a project directory or something, and maybe it looks like:
exec 'rails generate scaffold Client name:string website:string contact_name:string notes:string contact_email:string contact_phone:string --no-migration'
exec 'rails generate scaffold TargetLocation name:string address:string city:string state:string zip:string cbsa_code:string cbsa_name:string latitude:decimal longitude:decimal target_id:integer --no-migration'
exec 'rails generate scaffold TargetProxy target_id:integer proxy_id:integer --no-migration'
Then the user could easily execute the script with ruby schema_to_scaffold.rb
regardless of OS environment. I'm really new to a lot of this, so maybe this won't actually work.
from schema_to_scaffold.
Sorry for the spam. I'm not good with GitHub yet, and accidentally clicked the close button when trying to comment.
I originally thought "Maybe generate a .rb script that exec() or system()'s the commands, but even that has problems on basic Windows without CYGWIN installed - exec() and system() use Kernel.fork(), and apparently:
(eval):7:in
fork': fork() function is unimplemented on this machine (NotImplementedError)`
Anyway, maybe a text file generation option would be helpful in addition to the -c |clip option.
from schema_to_scaffold.
I'm not surprised that the Windows clipboard support doesn't work, since we
don't have a Windows machine to test it on. The OS X support didn't work
until I fixed it.
Humberto has been very open to accepting patches, so I encourage you to
write one for Windows that addresses your needs.
Dan Kohn mailto:[email protected]
tel:+1-415-233-1000
On Thu, Jan 22, 2015 at 9:44 AM, ttilberg [email protected] wrote:
Sorry for the spam. I'm not good with GitHub yet, and accidentally clicked
the close button when trying to comment.I was just going to suggest, perhaps an argument to write the scripts to a
file would be helpful for chumps stuck on Windows. I originally thought
"Maybe generate a .rb script that exec() or system()'s the commands, but
even that has problems on basic Windows without CYGWIN installed ( exec()
and system() use Kernel.fork() but(eval):7:infork': fork() function is unimplemented on this machine
(NotImplementedError)`Anyway, maybe a text file generation option would be helpful in addition
to the -c |clip option.—
Reply to this email directly or view it on GitHub
#21 (comment)
.
from schema_to_scaffold.
I took a few stabs at it, but kept hitting roadblocks. I'm a very new programmer, so there's probably something I am overlooking that can be done. If I do come up with something, I'll be sure to share it! I do appreciate that this tool exists -- even if it's hard to use on my Windows machine, it's great on my osx and linux!
from schema_to_scaffold.
Hi ttilberg. Thanks for your interest in this tool. Almost 2 years later... The option -c doesn't work in windows.
from schema_to_scaffold.
Related Issues (14)
- Odd number list for hash HOT 3
- undefined method `captures' for nil:NilClass HOT 8
- Bad table names with uuid ids
- Error when generating scaffold for multiple tables HOT 3
- v0.5.3 causes bundle exec rake to break and generates cattr_accessor error HOT 2
- Scaffold fails where tables contain non-English characters. HOT 4
- What about adding relations? HOT 3
- Version lock breaking compatibility HOT 3
- in `require': cannot load such file -- pry (LoadError) HOT 1
- unexpected token `<'` HOT 3
- Non interactive use HOT 1
- Unable to open file
- undefined method `to_script' for nil:NilClass HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schema_to_scaffold.