Tumgik
#rails3
yaasita · 7 years
Text
なぜRubyは一発屋でオワコンになってしまったのか?
18 :仕様書無しさん:2012/01/03(火) 09:38:24.52 プログラミングRubyのRubyベタボメっぷりにRubyを使い始めて早10数年、使えば使う程にRubyって駄目だなと痛感する Rubyを学習し始めた頃は誰でもRubyは素晴しいと思うのだが、数年も使えばそのどうしようもない互換性のなさにウンザリする しかも互換性が無くなることをマズいと思っていない集団がRubyを制作しているのでどうしようもない 1.4時代のコードが1.6になった途端に互換性がなくなり動かなくなることはあったが、1.6→1.8ではそれが顕著になり、1.9など何のエラーも出さずに前のコードが動く方が珍しいほど それどころか1.9に行かずREEが海外ではデファクトになりつつある現状、そして始まるPlain RubyとREEの方言問題 例えばPassengerもREEの方がうまく動いたり、かと思えば特定のバージョンだとPlainじゃないとまともに動かなかったりと、とても面倒臭い
美しいコードを求める為の副作用、という名の互換性のなさはRuby界全体に蔓延していて 例えばあれだけもてはやされたRailsも、Rails2とRails3の互換性のなさに誰しも苦労したのは記憶に新しいところ 誰もが互換性のなさに辟易し、俺ライブラリを量産するため、gemで探すと似たような事をする終わったプロジェクトがわんさか引っかかる 諸処の小さなプロジェクトだけがそんな現状ならば許せるが、dbiアダプタでさえそんな現状なので バージョンが変わるとデータベースにすら接続できなくなったとか、dbiのAPIバージョン変わったのにアダプタ側の更新ないな、 とか思ってるとアダプタ作者がRubyから足洗ってたとか余裕
身内同士でRubyはコードが美しいと四六時中自画自賛しているが、実はそれこそがRubyのガン その美しいコードという名のオナニーの為に一体どれだけの互換性と人的リソースが失われていったことか Rubyのコードは美しい、Railsスゲー、ベタボメする人は沢山いたがいつも一過性の人気しか得られないのはそこにあるし ベタボメしていた人達もしばらくするとウンザリしてRuby界から消えてしまうのも原因は実はそこにある 達人プログラマーはRubyをベタボメしなくなったし、Mongrel作者はRailsどころかRubyに見切りをつけちゃったしね ああいう熱狂的なRuby信者でもRubyから足を洗っているのを見ると、tDiaryがRubyに見切りつけてPythonで全部書き直したとか言われても驚かないだろう自分がいる
http://nozomi.2ch.net/test/read.cgi/prog/1322963111/
0 notes
supertheoristking · 6 years
Text
Ruby Ralis Developer
[ad_1] Gob title: Ruby Ralis Developer Company: Gob description: Ruby Ralis Developer Requirements in MNC- Clients Of SV MAnagement Consultancy Firm Work Experience 1 – 6 Year(s) Functional Area IT Role Software Engineer/ Programmer Industry IT-Software / Software Services Keywords Rails3 ,Rails4, j… Expected salary: Location: Indore, Madhya Pradesh Job date: Tue, 04 Dec 2018 03:37:37 GMT Apply for…
View On WordPress
0 notes
honyade · 7 years
Text
新春座談会 このコンピュータ書がすごい! 2018年版—2017年に出たコンピュータ書ならこれを読め!—
【ジュンク堂 池袋本店】 開催日時:2018年01月13日(土) 19:00開場 19:30開演
毎年恒例のコンピュータ書年間ふりかえり企画が今年もやってまいりました! 「新春座談会 このコンピュータ書がすごい!」が2018年も開催されます! 2017年も1000点を超えるコンピュータ書が刊行されました。 その中から注目したい作品を数十冊ほど選び出し、1時間半の間に紹介し倒すというコンピュータ書好きのコンピュータ書好きによるコンピュータ書好きのためのこの企画。 なんと今年で10年目、おかげさまで毎年満員御礼、コンピュータ書界隈における新春の風物詩としてすっかり定着したことにしたい今日このごろです。 そんなわけで、今年も「このコンピュータ書がすごい!2018年版」と銘打って、この2017年に発売されたコンピュータ書を振り返ってみることと相成りました。 ベストセラーやロングセラーや話題作だけでなく、ほとんど一発ネタのような本からここをどうにかすれば傑作だったのにという本まで、見逃せない本の数々をご紹介できれば幸いです。 講演者は昨年同様、コンピュータ書を生み出す最前線で活躍されている出版社の方々と、「日本Rubyの会」代表理事であり、『たのしいRuby』などの著者(共著)としても知られる高橋征義さんです。
高橋征義(たかはし まさよし) 1972年生まれ、札幌出身。電子書籍の制作と販売を行う(株)達人出版会代表取締役プログラマ。また、2005年より「日本Rubyの会」代表理事を務める。著書に『たのしいRuby』『Rails3レシピブック』(共著含む)等。好きな作家は新井素子。
稲尾尚徳(いなお なおのり) (株)技術評論社雑誌編集部所属。Webアプリケーション開発のためのプログラミング技術情報誌「WEB+DB PRESS」および同書籍シリーズ「WEB+DB PRESS plus」を担当。
杉山聡(すぎやま さとし) SBクリエイティブ(株)&IDEA編集部所属。『たのしいRuby』『ふつうのLinuxプログラミング』『「ファンタジー背景」描き方教室』『ゲームシナリオの書き方』などの企画・編集を担当。
村田純一(むらた じゅんいち) 1975年生まれ。株式会社ビー・エヌ・エヌ新社の書籍編集者。2017年は『UIデザイナーのためのSketch入門&実践ガイド』『Visual Thinking with TouchDesigner』などを担当。
森田尚(もりた ひさし) 株式会社ビー・エヌ・エヌ新社所属の書籍編集者。理工学系出版社で書籍の企画編集・編集制作システムの構築・電子書籍ストアの企画運営などを担当したのち、2017年11月より現職。
矢野耕次(やの こうじ) 株式会社オライリー・ジャパン セールス&マーケティング担当。ジュンク堂書店池袋本店出身。企画段階から書店営業にイベント会場での販売、直販まで関係し、川の流れにも似た書籍のライフサイクルを見届けています。
★入場料はドリンク付きで1000円です。当日、会場の4F喫茶受付でお支払いくださいませ。 ※事前のご予約が必要です。1階サービスコーナーもしくはお電話にてご予約承ります。 ※トークは特には整理券、ご予約のお控え等をお渡ししておりません。 ※ご予約をキャンセルされる場合、ご連絡をお願い致します。(電話:03-5956-6111)
■イベントに関するお問い合わせ、ご予約は下記へお願いいたします。 ジュンク堂書店池袋本店 TEL 03-5956-6111 東京都豊島区南池袋2-15-5
イベント情報の詳細はこちら
from honyade.com http://ift.tt/2pCJz2H
0 notes
edgar · 9 years
Text
How to skip all filters in controller - Rails
If you need to skip in an specific controller all the filters defined in the ApplicationController, you can do this:
class MyController < ApplicationController if Rails::VERSION::STRING > "2.3" skip_filter *_process_action_callbacks.map(&:filter) else # rails 2.3.x skip_filter filter_chain end end
0 notes
dennismonsewicz · 11 years
Text
Active Admin, Kaminari and Rails boot up
Active Admin is an extremely nice tool when you need to have a quick 'plug & play' CRUD to give to admins to help administer a website.
One of the problems I kept running into was that every time my Rails server booted up (locally, production, etc), was that Kaminari (Rails gem for pagination - used by Active Admin; https://github.com/amatsuda/kaminari) would run through each registered Active Admin model and would attempt to override any page scope (by default Kaminari uses the method name of page when referring to pagination with a model and its results).
The problem looks like this (check your rails log during bootup):
https://gist.github.com/dennismonsewicz/9beedaea835e4a687472
To fix this issue simply do the following:
https://gist.github.com/dennismonsewicz/173fbfe9d25d679134c7
Happy Hunting! Dennis
0 notes
henrikwiberg · 11 years
Text
Getting rid of those "Can't mass-assign protected attributes.."
So with Rails 4.0.0 I also came across issues with protected attributes.
By the way. Remove 'protected_attributes' from your Gemfile in case you've added that there, to ease your transition to Rails 4.
I solved this by doing two things:
Removing my attr_accessors on the model causing trouble, in my case the User model. So the information below will exemplify a solution for a model named User.
In your controller corresponding to the model, i.e. users_controller, you put the Rails 4.0.0 way of making attributes accessible.
private def user_params     params.require(:user).permit(:password, :password_confirmation, :token) end
Placing this in your controller tells rails the same thing that attr_accessor did.
In my case there is three attributes, password, password_confirmation and token.
Good luck.
0 notes
senthiljruby · 11 years
Text
Creating live application on Heroku with Rails 3.1.3
Create a new Rails application
rails new my_app -d mysql
Code the application with your own content,
                      ..............................
.............................
Add following code in GemFile
gem 'execjs'
group :production do   gem 'therubyracer', '~> 0.9.3.beta1'   gem 'pg' end
Now run bundler without production
bundle install --without production
After this create heroku application along with stack using,
heroku create my_app --stack cedar
Now commit the code to heroku,
  git push heroku master
  Counting objects: 67, done.
Delta compression using up to 4 threads.  
Compressing objects: 100% (52/52), done.
Writing objects: 100% (67/67), 86.33 KiB, done.
Total 67 (delta 5), reused 0 (delta 0) '
-----> Heroku receiving push
-----> Rails app detected ------------------------------------------- ------------------------------------------- -------------------------------------------
0 notes
gom68 · 11 years
Link
0 notes
elia · 11 years
Text
Past and Future of Ruby and Rails
As a sad orphan of railsapi.com I'm proud to present you valuable links to ruby and rails documentation in SDoc format:
Searchable Ruby 2.0 API documentation
http://elia.github.io/railsapi.com/public/doc/ruby-v2.0/
Searchable Rails 3.2 API documentation
http://elia.github.io/railsapi.com/public/doc/rails-v3.2/
1 note · View note
kars7e · 11 years
Text
I18n::InvalidPluralizationData in rails 3.2 with polish locale
In case u receive this error with such explanation:
translation data can not be used with :count => 2
Remember that you need to define a "few" and "many" key for translation for particular entity, e.g.:
pl:
  activerecord:
    models:
      article:
        one: "Artykuł"
        few: "Artykuły"
        many: "Artykułów"
        other: "Artykuły"
0 notes
oivoodoo · 12 years
Text
Migrating s3 data to the new account
Few days ago I needed to migrate s3 data from one account to another account. I've decided to use as background worker heroku server. And wrote this code below:
https://gist.github.com/oivoodoo/5099330
1 note · View note
steveroettger-blog · 12 years
Text
Disable Automatic Asset Generation on Rails Generate
Although it can be a nice to have, the automatic assest (stylesheets/javascripts) generation can sometimes get annoying. It's a pretty easy fix to turn it off, just got to your 'application.rb' file and type:
config.generators.stylesheets = false
config.generators.javascripts = false
0 notes
kazu69 · 12 years
Link
0 notes
edgar · 10 years
Text
My Pry customizations for Rails console
I'm using Pry for my Rails console, I have defined the following alias in my ~/.zshrc to start the rails console using Pry:
alias sc='./script/console --irb=pry'
The .pryrc file is analogous to the .irbrc file for IRB. You can use the .pryrc file to customize Pry.
Below is my ~/.pryrc file:
The first line configure SublimeText 3 as Pry's editor
The methods unbundled_require and load_gem allows me to load an installed gem that is not included in the current project's Gemfile. In my case I'm loading the awesome_print gem (line 45) to pretty prints Ruby objects in full color exposing their internal structure with proper indentation
And then depending on the current Rails version, I configure the Rails logger (Rails 2) or the ActiveRecord logger (Rails 3) to use the STDOUT, in order to print the SQL statements to console.
This is how it looks my Rails console with these customizations:
Tumblr media
0 notes
Text
Rails3 singleton resource with form_for gotcha
Dealing with the singleton resource was quite a bit tricky: # config/routes.rb resource :passion # form.html.slim = form_for @passion do |f| Throws an error: undefined method `passions_path' for #:0x000001347f1ae0>` So the fix is: = form_for @passion, url: passion_path do |f|
0 notes
henrikwiberg · 11 years
Text
Heroku errors when upgrading a Rails 3 app to 4.0.0?
Upgrading to 4.0.0 from a Rails 3 app caused a bunch of issues for me.
I use Heroku and this how I solved.
The errors manifested themselves as Heroku error code:
H10 – App crashed
That means the dynos kept crashing and when that is the case, they take a 10 minutes break before trying to reboot themselves.
But as soon as they reboot, they crashed instantly and after further investigating the heroku logs revealed:
R99 – Platform error
An error on Heroku's side, but that is not the case.
It also reveals: 
app[web.1]: bash: bin/rails: No such file or directory
It turns out than when you update from a Rails 3 app you need to take some actions to ease the transition to 4.0.0. Among other things you need to run:
rake rails:update:bin
To solve the dyno's crashing.
This creates a number of bin/ directories that is required by Rails 4.0.0, but your Rails 3 app lacked.
There are a number of other steps to take but those are covered both here https://devcenter.heroku.com/articles/rails4 and here by Ryan Bates of Railscasts, http://railscasts.com/episodes/415-upgrading-to-rails-4.
0 notes