Feed on
Posts
Comments

Category Archive for 'Ruby on Rails'

jpmobileをテスト

携帯の絵文字とかよくわかってないのでherokuを使ってjpmobileプラギンのテストすることにしました。上記QRコードでhttp://jpmobile.heroku.comへ飛びます。携帯で絵文字がんがん使って書き [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

jpmoblieとadsense

とりあえずうまくいっていない。
i-mode HTMLシミュレーターIIでは表示されたりされてなかったり。
パケホウダイではない私は実機を使ってそうテストもできない。
アクセスが1秒に1アクセスぐらいあるので対応しようと [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

PLAIN TEXT
CODE:

<% a = '<b>abcdefghijklmnopqrstuvwxyzあいうえおかきくけこ</b>

http://www.google.co.jp<br />

<a href ="http://www.yahoo.co.jp" onclick="return confirm(\'本当にですか?\');">yahoo</a>' %>

<h2>h:</h2>

<%= h a %>

<h2>simple_format:</h2>

<%= simple_format a %>

<h2>auto_link:</h2>

<%= auto_link a %>

<h2>excerpt a, "stu", 10:</h2>

<%= excerpt a, "stu", 10 %>

<h2>excerpt a, "いうえ", 5:</h2>

<%= excerpt a, "いうえ", 5 %>

<h2>highlight a, "いうえ":</h2>

<%= highlight a, "いうえ", highlighter = '<font color="red">\1</font>' %>

<h2>strip_links:</h2>

<%= strip_links a %>

<h2>sanitize:</h2>

<%= sanitize a %>

<h2>simple_format(h):</h2>

<%= simple_format (h a) [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

通しで読んだ。知らないこと多かった。simple_formatなんて今日始めて知った。モデルの構造化のところは、こういう情報って、ぐぐり方がよくわからないので助かる。
RailsによるアジャイルWebアプリケーション開 [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

Railsアプリの骨格ができた

はじめてのRails2.0。新アプリは一応お勉強ソフト。Rails2.0はRESTの部分でformとかかなりかわってたのでめんを食らう。DRYの原則を守ろうとしてプログラムが細分化されて行くのが、後からみて解るのかどうか [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

Railsでアプリを作っていて楽しいところは簡単に動作するアプリが作れるところなのですが、簡単に作れるだけに変更もしたくなります。機能の拡張などをして行くと、機能の拡張に対応できるテーブル設計を最初からできているかがどん [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

新しモン好きの血が騒いでしまい、Parallels + Ubuntu Hardy + Apache + mod_rails + MySQL + Fastladderをインスコしてみました。結論から言うとかなりいい感じ。
[...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

mod_railsがでてるみたい

http://www.modrails.com/
デプロイが簡単になるといいとは思うけど、共用サーバーで使えるようになるのはいつの日か。

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

railsとsubversionの使い方

http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion
(日本語訳はhttp://techno.hippy.jp/rorwiki/?HowtoUseRailsWithSubversion)
http://randomutterings.com/articles/2007/09/19/subversion-script-for-rails-developers
を見てやってみた。当方leopard。
rails-svnというコマンドとrailscommitというコマンドを作る。
rails-svnはrails hogeとアプリを作る際に一緒にレポジトリも指定しcommitする必要のないファイルを削除指定しcommitまで済ませるコマンド。railscommitはscaffold等大量のファイルを作った作業後svn addするのは手間なのでそれらを一括してするコマンド。
rails-svn
#!/bin/bash

if [ "$#" != "3" ]; then
echo "Usage: rails-svn app_dir repository username"
exit 1
fi

APPDIR=./$1
SVN_TRUNK=$2
SVN_USER=$3

function check_if_exist () {
if [[ -e $1 ]]; then
echo ""
echo "$1 already exists, overwrite? y or n"
echo ""
read OVERWRITE
[...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

Rails2.0になってsqlite3が標準になったのでインスコはめっちゃ簡単。
http://rubyforge.org/frs/?group_id=167
ここからruby186-26.exeをインスコして、
htt [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

RESTful Webサービス

RESTful Webサービス
読了。初めて読んだ設計の本な気がします。URIの設計部分が面白い。
こっそりRails本です。サンプルのメインはrubyです。Rails1系を経験後Rails2.0で何か作ろうとform [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

http://fastladder.org/ja/index.html
fastladderがオープンソースになりRailsベースみたいなのでさっそく見てみた
svn checkout http://fastladder [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

rails2.0を試してみました。
とりあえずrails hogeとしてみて、script/generate scaffold test name:stringをやってみたのですが、
def show
@test = [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

すごく簡単だった。
gem install amazon-ecs
をインスコして
require 'amazon/ecs'
def book_search
Amazon::Ecs.options = {
:aWS_access_key_id => '# your accesskey',
:associate_tag => "#Associate ID",
:country => :jp
}
@res = Amazon::Ecs.item_lookup(params[:book][:asin], {
:response_group => 'Medium',
})
end
がcontrollerで
<table>
<tr>
<td width="10%">画像</td>
<td width="40%">タイトル</td>
<td width="20%">作者</td>
<td width="10%">出版社</td>
</tr>
<% @res.items.each do |item| %>
<tr>
<td>
<% if item.get_hash('smallimage') != nil %>
<%=image_tag(item.get_hash('smallimage')[:url], :alt => item.get('title')) %>
<% end %>
</td>
<td><%= item.get('title') %></td>
<td><%= item.get_array('author').join(", ") %></td>
<td><%= item.get('publisher') %></td>
</tr>
<% end %>
</table>
viewはこんな感じで、終了。
# your accesskeyはここからゲト。

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

Leopardでgem updateしてみた

Rails2.0が出たというので
sudo gem update
してみました。
*** LOCAL GEMS ***
actionmailer (2.0.1, 1.3.3)
Service layer for easy email delivery and testing.
actionpack (2.0.1, 1.13.6, 1.13.3)
Web-flow and rendering framework putting the VC in MVC.
actionwebservice (1.2.6, 1.2.3)
Web service support for Action Pack.
activerecord (2.0.1, 1.15.6, 1.15.3)
Implements the ActiveRecord pattern for ORM.
activeresource (2.0.1)
Think Active Record for web resources.
activesupport (2.0.1, 1.4.4, 1.4.2)
Support and utility classes used by [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

Leopardでのgem list

*** LOCAL GEMS ***
actionmailer (1.3.3)
Service layer for easy email delivery and testing.
actionpack (1.13.3)
Web-flow and rendering framework putting the VC in MVC.
actionwebservice (1.2.3)
Web service support for Action Pack.
activerecord (1.15.3)
Implements the ActiveRecord pattern for ORM.
activesupport (1.4.2)
Support and utility classes used by the Rails framework.
acts_as_ferret (0.4.1)
acts_as_ferret - Ferret based full text search for any ActiveRecord
model
capistrano (2.0.0)
Capistrano is a [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

Railsでサーバーを公開しようと思うと高価なレンタルサーバーか自宅サーバーになると思うのですが、自宅サーバーはできるだけ手っ取り早く完成させたい物です。
ActionMailerを使おうにも自前のメールサーバーの設定は [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

file_columnというすばらしいプラギンでuploadしたファイルじゃなくて、URLから取得したファイルをfile_columnに投げたいんだけど、どうすればいいのか今現在全く解らない。教えてエロイ人。
[追記]
[...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

ShareOnTumblrというすばらしい機能にインスパイアされてhttp://suakx.jpをリニューアルしていたのですが、やっとのことでShareOnSuakxが完成しました。(まだテスト中)
まだ、リンクとクォー [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

なおった

IEでの表示崩れなんとか直せました。
わかったこと
width : 20%;
width : 30%;
width : 50%;
とかして、横並びのレイアウトをしようとすると合計が100%だと表示が崩れる。99%にするの [...]

  • hatena
  • livedoor
  • google
  • yahoo
  • del.icio.us
  • Digg

Read Full Post »

« Prev - Next »