小女在Coursera网站学校Web应用程序设计,第一次接触到Web,但是在做第一个programming assignments时着实为难了一番。
第一步:构建web程序的开发环境(我的是windows 7系统,不同的系统方法不一样)
1.Ruby on Rails 的环境安装和Gems:
(当时的参考文章链接)http://blog.csdn.net/abbuggy/article/details/7400848
http://www.admin10000.com/Document/140.html
安装完成后可以在cmd命令窗口中输入ruby -v,rails -v,gem-v来测试安装的是否正确。
2第一个Ruby On Rails WEB应用程序HelloWorld
参考链接:http://blog.csdn.net/kezhongke/article/details/11683185
注意:我的hello例子建立的目录是E:\program\workspace
command 1: E:\program\workspace>rails new hello
接着生成控制器Say.这个步骤必须在hello目录里面,否则会出现错误。
command 2:cd hello
command 3:E:\program\workspace\hello>rails generate controller Say hello
3使用Git把源码上传到BitBucket
参考链接:http://blog.csdn.net/wangzhiyu1980/article/details/8515296
按照上面的步骤就可以完成。其中在上传时会输入用户名和密码。
4交作业
You will want to change the URL inside to be the URL where your bitbucket repository is located. Then from the command line, run the submit.py file 'python submit.py'. This will prompt you for your Coursera username and a password that is generated on the programming assignments page.
改变URL时注意:要注意是Clone->HTTPS处的地址,但是要移除7137340@
在cmd命令窗口中执行命令python submit.py时要把那几个文件放在和python相同的目录下面。