• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

I released the merb_full_url plugin that provides URL which has origin (scheme, host and port)

You can install this gem like this;

   1  % sudo gem install merb_full_url --source http://merbi.st

And you get full URLs by calling full_url/full_resource methods instead of url/resource.

But I think, it is better for merb to become providing such methods in advance :-)

posted by Png takiuchi on Sat 24 Jan 2009 at 02:30

I am using merb with passenger on our production server. The passenger is going well in most of cases. But if dependent gems have been updated, it becomes acting up when it got restarted. After I encountered such situations several times, I decided to begin investigation about the issue.

Detail of the issue is as follows.

  • My merb app becomes causing errors after restarting of passenger by "touch tmp/restart.txt" if dependency gems were updated and they have no compatibility.
  • Even if the gems were compatible, my merb app kept using old gems until apache is reloaded.
  • pids were changing successfully while restarting.
  • /etc/init.d/apache reload can refresh everything as expected.
  • "touch tmp/restart.txt" can't.

I wonder there is the master of master processes which keeps LOAD_PATH and it is refusing to use new gems. I am thinking I should investigate the Rack.

Update

Finally, the issue was solved!

The solution is found here

posted by Png takiuchi on Sat 17 Jan 2009 at 22:42

Recently, I've been making web sites by using Merb. It was like a battle lacking logistics.

I made and released dm-pagination on github. http://github.com/genki/dm-pagination/tree/master

Yes, I know dm-is-paginated-0.0.1, but its spec files was not working. The dm-pagination is able to be used with arbitrary collections which include scoped_query.

You can easily paginate, like this:

   1  class Posts
   2    def index
   3      @posts = Post.paginate(:page => params[:page])
   4    end

Links will be drawn by calling simple helper method.

   1  <ul>
   2  <% @posts.each do |post| %>
   3    <li><%= h(post.body) %></li>
   4  <% end %>
   5  </ul>
   6  <%= paginate @posts %>

merb_slice-gen is also available in order to provide useful generators for slices of which it has namespace but doesn't have subdirectories.

You can generate controller, resource and resource_controller in slice project, like this

   1  % slice-gen controller top

it generates controller files enclosed by SliceName module without any subdirectories.

In addition, there are other gems I made.

posted by Png takiuchi on Thu 15 Jan 2009 at 03:05
Contents
Released merb_full_url plugin
About an issue of using merb with passenger
I published some gems for merbist
Comments
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
falsefalse: @tiancongxin try using this one https://github.... '12-2
tiancongxin: TerminalCopyOnSelect not work on OS X 'Lion' , ... '11-7
staiano: Roderick you rock for recompiling it. Thanks. '11-3
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ