Sira PS wrote in post #994846:
I’m a newbie and i’m working follow this link
http://dima.github.com/2009/03/19/working-with-restfulx-model-attachments.html
But I stuck on the step run ./script/generate rx_config. I don’t know
how can I run it. I tried to go to the path of folder script and typed
generate rx_cofig on command line but it doesn’t work.
C:\Data\Workspace\rx_model_attachments\script>generate rx_config
I got the error ‘generate’ is not recognized as an internal or external
command, operable program or batch file.
Anyone can tell me step by step of doing this. Big thanks!
C:\ruby> rails demo
Now go into demo application root directory as follows:
C:\ruby> cd demo
C:\ruby\demo> dir
You will find a directory structure as follows:
demo/
…/app
…/controller
…/helpers
…/models
…/views
…/layouts
…/components
…/config
…/db
…/doc
…/lib
…/log
…/public
…/script
…/test
…/tmp
…/vendor
README
Rakefile
Soooo, if you are in the demo dir, then the command:
…dir1/dir2/demo> ./script/generate rx_config
will execute a program called ‘generate’, which is located in the script
directory. If you cd to the script directory, then the command would
be:
…dir1/dir2/dem/script/> genarate rx_config
If that doesn’t work, then type dir at the prompt:
…dir1/dir2/dem/script/> dir
to see if the generate program exist in that directory.
If you have performed these steps:
===
The next thing we need to do is add restfulx and paperclip gems to our
application configuration. Make sure you install these gems if you
haven’t done so already.
$> sudo gem install paperclip
$> sudo gem install restfulx
Let’s edit config/environment.rb.
@@ -27,6 +27,8 @@ Rails::Initializer.run do |config|
config.gem “sqlite3-ruby”, :lib => “sqlite3”
config.gem “aws-s3”, :lib => “aws/s3”
-
config.gem “restfulx”
-
config.gem “paperclip”
Only load the plugins named here, in the order given. By default,
all plugins
in vendor/plugins are loaded in alphabetical order.
Now we can run ./script/generate rx_config to set up the default
RestfulX configuration.
…it should just work.