Показаны сообщения с ярлыком rails. Показать все сообщения
Показаны сообщения с ярлыком rails. Показать все сообщения

Ruby on Rails Paperclip Amazon S3 Upload problem


After configuring Paperclip to use S3 that appeared:
The specified bucket does not exist
 
Very easy to create Amazon S3 bucket with S3Fox plugin.
 
Error message: 
The bucket you are attempting to access must be addressed using
 the specified endpoint. Please send all future requests to this endpoint.
 
 The probem was that "Currently the aws/s3 Ruby library 
doesn't handle European buckets at all". 
So create new bucklet NOT in Europe. 
 
Have a nice day! 



Spree: the Best practice

Last week I've been working at shop based on Spree. And it was awful. See my thread in spree google group:  What is the Best Spree practice?



Simple nicEdit plugin for Ruby on Rails

Yesterday I've posted new Ruby on Rails plugin Simple nicEdit. It helps to use tiny rich edtior nicEdit in your rais application.

It's supposed, that you are already using jrails plugin, that replaces prototype with jQuery. If not, than install it:
$ ruby script/plugin install git://github.com/aaronchi/jrails.git

Installing Simple nicEdit plugin:
$ ruby script/plugin install git@github.com:sergio-fry/Simple-nicEdit.git

Add js to your layout:
<%= javascript_include_tag 'nicEdit', 'nicEditInit' %>

Use it in form
<% form_for @page do |f| %>
  <%= f.rich_text_area :body %>
<% end %>

Result:










Good Luck!



VIM. Great tool for programmer

VIM is a great instrument for programmer. It's fast, stable, has a lot functionality. But there is one thing you should know before you start: VIM is extremely shortcut oriented text-editor.

I was a fan of jEdit, but it is very unstable. A lot of plugins are crashing time after time. So I decided to find something else. IDE's like NetBeans and Eclipse are very slow. I've used Emacs and it was interesting. But it wasn't mine. That's why I've tried VIM.

I'm using it about 6 month and I can say, that my happiness is growing day after day.

Plugins, that you have to try:
rails - awesame plugin for Ruby on Rails
matchit - aotocomplete html tags with "Cntrl"+ "Shift" + "_"
autotag - quick updating ctags file after each file write

that's all :)
VIM has all you need out of box. When I'm saying "all you need", I don't mean "all you want" or "all you expected from VIM". There is a VIM Way. It's quite differ from IDE.

Here is my config ~/.vimrc:



Stop comparing PHP to Rails

PHP is a language. Rails is a Ruby framework. Comparing PHP to Rails is like comparing Perl to Django, or Haskell to Seaside, and that makes no sense. Two things that DO make sense:

  • Using PHP for web development. It deploys and scales great.
  • Using Ruby on Rails for web development. The framework provides an excellent set of conventions for rapid development.

text source: stop-comparing-php-to-rails

Everybody knows, that php is language and rails is framework. But when we talk about php side we mean main ways of developing with php. It is a context of this day.

Fact is that rails was written on ruby. And even symphony-project can't beat it.



Rails way on PHP

People love their history. That's why sometimes they try to make something like Ruby on Rails but on PHP or something else. Examples: Symphony, PHP on Rails.

I think that the spirit of pioneer is very important.

Ruby on Rails is:
  • fast;
  • flexible;
  • beautiful (i don't mean textmate or mac :-);
  • original.. as Mohamed Ali.
and no one can beat it.

PHP is good only if you want to make static html site.



PHP is not dead!

Sometimes it seems like Ruby on Rails is so cool. It is. But in some ways PHP is better. In small projects, where price of hosting is important.

Hmm. But at hostingrails dot com we can buy rails for only $3.59 / month.

F*ck. PHP is dead!




2008–2014 © Сергей Удалов Реклама Система Orphus