You are here: Forums Ask a Rails expert Get disk info...
Posted in Forums : Ask a Rails expert
Authority 0
Posting Rating 15
Sign in to rate this post
|
Hello I would like to know how can I can the available space from a given drive using Ruby. Thanks |
Authority 12
Posting Rating 78
Sign in to rate this post
|
if you’re running a UNIX system, you can try this for a pretty basic output: system(‘df -h’) |
Authority 0
Posting Rating 15
Sign in to rate this post
|
Thanks but my application will run on a windows platform… Any idea how can I do this? |
Authority 0
Posting Rating 15
Sign in to rate this post
|
Ok, I have the solution for windows environment. Here it goes: require ‘win32ole’ wmi = WIN32OLE.connect(“winmgmts://./root/cimv2”) |
Ask a Rails expert : How to parse <pubdate> in RSS
Ask a Rails expert : Couldn't find Product without an ID
Ask a Rails expert : HTML to XML ---> get title & description
Ask a Rails expert : Accessing controller actions from scripted page?
Ask a Rails expert : seledted option for select_tag
Ask a Rails expert : Merging fields from two tables into one, including duplicates
Ask a Rails expert : saving has_many :through
Ask a Rails expert : Use Rails to develop sites for both Designer and Programmer
Ask a Rails expert : Rails+RS232
Ask a Rails expert : Is this a good way to add Admin section