....Ruby on Rails 目標?? --2--

basic 終於結束了!往下一個。上一個步驟,最多問題rails3有些指令是rails4不能用,其中route中的match,現在要指定get或post,反正目前搞不清楚,所以只能自己手動加route,先能跑就好,以後比較熟,再好好研究,不然一直卡住,先往下學。 RESTful 應用程式 http://ihower.tw/rails4/restful.html ===== button_to ===== 如果用button_to,而產生route跟你要POST,後面補上 :method => :get <%= button_to ‘New event’, new_event_path, :method => :get%> 這樣就ok~ 解答來自下面連結 http://stackoverflow.com/questions/5221227/rails-button-to-fails-with-path-doesnt-exist-for-a-path-that-exists

2014-07-04 · 1 min · 23 words · Me

....Ruby on Rails 目標?? --3--

http://ihower.tw/rails4/environments-and-bundler.html Rails 啟動與應用程式設定 =>/config/application.rb

2014-07-04 · 1 min · 4 words · Me

ubuntu安装完vbox没有无缝模式 for line.....失敗…因為一定要灌一套windows系統,用win8pe又不行…放棄

http://www.cnblogs.com/telnetning/archive/2013/05/18/3084829.html 底下[轉] apt-get install virtualbox 不晓得上次是怎么装的了,怎么都没装对,这次没想到执行完就可以直接打开了。也许是由于源的问题导致的版本库文件等的问题? 不管这个了先,赶紧装上xp,装上qq。 virtualbox的外观有几种模式:全屏模式,自动缩放模式等等。我最喜欢的就是无缝模式。 在全屏模式下,分辨率稍微调高一点,xp的桌面就跑到屏幕外面去了,真是痛苦。 在自动缩放模式下,xp桌面能根据vbox框框的大小而变化。听着感觉很好,可是丫坑爹的在于这个模式下xp桌面总是不清不楚,显得很模糊。 于是我开始怀念可爱的无缝模式。 无缝模式可以让虚拟机和物理机的桌面重合,具体就是可以不用使用虚拟机的桌面,虚拟机的软件直接就像是承载在物理机的桌面上。再也不 用为了在物理机和虚拟机之间切换而痛苦了。 可是我的vbox居然显示无缝模式是灰色的,即不可用。 看网上的,别人的vbox上面还有菜单选项,回头看我的,找了半天在ubuntu的顶部找到了,但是没有device选项,看来是缺了什么东西。 后来明白了,应该是某些增强包没有装,其实我觉得这个增强包就像是插件。 找到解决方法: apt-get install virtualbox-guest-additions-iso ok,解决了 方法简单,过程曲折。 学习就是这样,虽然费时间,但是也学到了学多其它的东西。

2014-07-03 · 1 min · 23 words · Me

....Ruby on Rails 目標??

http://vimeo.com/35998909 參考:http://clickonchris.com/2014/02/beerdogging-mobile-phonegap-angularjs/ 第一步:裝RVM,保持乾淨的環境,不要用原生環境 http://dylandychat.blogspot.com/2013/11/ubuntu-rvm-ruby-on-rails.html http://blog.eddie.com.tw/2011/04/08/rvm-and-gemsets/ http://www.openfoundry.org/tw/tech-column/8513-rvm-ruby-environment-version-manager http://ihower.tw/rails3/advanced-installation.html# Ubuntu Desktop部份 看完,做完,心裡就有數了。 http://my.oschina.net/zlLeaf/blog/149650 上网查了一下,说要在Gemfile上加上gem ’execjs’ 和 gem ’therubyracer’,但是就不告诉我到底Gemfile在哪里啊,那叫我这种菜鸟去哪里找这个文件喔,然后我把整个.rvm文件都找遍了,终于知道了原来Gemfile在项目文件夹里面,不再.rvm里。。。。。。 所以我在projectName(刚刚新建的那个项目)里面的Gamefile加上gem ’execjs’ 和 gem ’therubyracer’(在END之前加啊,相信应该都看得懂的),然后运行bundle install之后就可以运行rails server启动服务器了,连关闭都正常了,太高兴了 另外 重開shell後,無效問題 http://www.openfoundry.org/tw/tech-column/8513-rvm-ruby-environment-version-manager https://rvm.io/rvm/install 方法一:執行 source ~/.rvm/scripts/rvm 方法二:Put this in your ~/.profile or ~/.bashrc: [[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm” 按 http://ihower.tw/rails3/firststep.html 練習 http://ihower.tw/rails3/ruby.html http://ihower.tw/rails3/basic.html ====basic=== match ‘:controller(/:action(/:id(.:format)))’ 這無用,自己手動加route » get “events” => “events#index” get “events/new” => “events#new” post “events/create” => “events#create” ====basic=== @event = Event.new(params[:event]) 這裡在rails 4.0有變化 http://stackoverflow.com/questions/17335329/activemodelforbiddenattributeserror-when-creating-new-user def create @event = Event.new(user_params) …. ...

2014-06-30 · 1 min · 109 words · Me

[轉]免費架網站的好幫手《Wix.com》

http://blog.soft.idv.tw/?p=1712#more-1712

2014-06-18 · 1 min · word · Me