Search the Community
Showing results for tags 'ruby'.
-
Hi I am frustrated from this simple task, I've been testing this script for two hours trying to find the problem but no luck! My script reads a command line argument(ARGV[0]), then creates a directory named as #{ARGV[0]}, then it reads the DATA object (after the __END__ which looks below), and create those directories inside ARGV[0] __END__ app/views/layouts app/models app/controllers config db doc lib public/javascripts public/stylesheets public/images log note that I am using Notpad++ and i have EOL set to UNIX, so it is NOT supposed to cause any \n troubles My script creates what looks like directories, i can see them in my FTP but I can't delete any! when I asked my instructor about it, he said, review your code, lib (directory) is NOT like lib? so I am wondering where did the question mark come from? also note that I do NOT see ? when i use SSH client or FTP! i had to run another script to delete these weird directories this is my script require 'fileutils' include FileUtils if ARGV.empty? puts "__________________________________________ _ _" puts " " puts "USAGE: ruby script/generate.rb Your_Site_Name" puts "__________________________________________ _ _" elsif Dir.exists?("/home/students/myname/public_html/cis113/#{ARGV[0]}") puts "This directory already exist!" puts "Would you like to use the existing directory (Y/N)?" #I need help with this part later #read DATA and create directories else Dir.mkdir("/home/students/myname/public_html/cis113/#{ARGV[0]}") DATA.each do |line| FileUtils.mkpath ("/home/students/myname/public_html/cis113/#{ARGV[0]}/#{line}") end end help is highly appreciated
-
Hello, I was studying through the CANVAS LMS and looked at a few demonstrations that were at dev cons. The problem is the canvas LMS is built with Ruby I believe so all the demos to connect to the API were using Ruby. Unfortunately the app that I'm working this into is using PHP, so once I develop the module for this part of the app I nned to figure out what the best way to do this is. Will I be able to use Ruby to do in this app as well? It's using something called Kurogo and most of the other modules that call data use PHP. So I'd prefer to use PHP, but I see no good documentation for getting it (CANVAS LMS API) running with PHP. I'm just trying to study up on this for when I'll be building this new part of the app in the summer most likely (or fall) and want to figure out the best course of action or where I can find decent documentation ofr this. Thanks in advance!
- 1 reply
-
- php
- canvas lms
-
(and 2 more)
Tagged with: