Rails 3.x launcher script was found instead of Rails 4.x one.

Upgrading to Rails 4 in an existing application can be quite a switch. I decided to make the jump and handle any complications as they come. After about an hour or so I was mostly up and running, with a few issues here and there with gems I am using and their various versions.

Resources

As is often the case, the Railscast on the subject proved invaluable. There is also a robust compilation of Rails 4 links being maintained here.

RubyMine

If you use RubyMine, you may run across an error when trying to start your development server.

1
Error running Development: Rails 3.x launcher script was found instead of Rails 4.x one.

When a new Rails 4 application is created, it generates a ‘bin’ folder. Creating a new, blank Rails 4 application and copying its ‘bin’ folder into the existing project will resolve the error and allow the server to be started in RubyMine.

Gems

One gem that gave me a few errors was simple form. I updated my Gemfile to:

1
gem 'simple_form', '~> 3.0.0.rc'

However, when loading my forms in the browser, I received another error:

1
wrong number of arguments (3 for 2)

After doing some digging I found that this was actually related to the client_side_validations gem, which I was no longer using and safely removed this from the project. If you need this gem, there is a branch for Rails 4 which should help.

Looking forward to implementing the great additions in Rails 4.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值