Just starting with Rails & # 8594; Is it really a buggy at the moment or is it just me?

I spent a lot of time on PHP and Python frameworks, and recently thought that I would fork out. I like the infrastructure itself, but I seem to spend at least half of my development time using odd bugs and / or incompatible versions between rails / ruby ​​/ rake / gems.

I am happy to fight for all this if he has less trouble, but even after a month it seems to me that I spend 90% of my time chasing the mistakes of others, and only 10% of my time pursues my own. The only guy I talked to (who used it extensively until 2008) offers, "Over the past 2 years, it's quite a few rails."

Any opinion on this? Is it improving, or is it just an assessment of the current rail development?

Running through Ubuntu 10.04, if that matters.

+4
source share
4 answers

Rails is currently in the process of transitioning between 2.3x and 3.0, so you will find it quite complicated, as most of the latest documents and plugin plugin plugins are updated for rails 3. There are several tools that are needed now to discuss this material. First off, Rails 3 uses a bunch of dependency management tools, a much more civilian way to manage gems.

gem install bundler cd my_rails_project bundle install 

RVM (ruby version manager) is awesome and I would recommend installing it. Then you can create gemsets and dependency sets for each project. and you don’t need root access to install.

too, if it were me, I would just go and start on rails 3

gem install rails --pre

if you want to stay with rails 2.3.x, use the rake command to install the declared dependencies.

rake gems:install

if the project is a good project, it will be quite specific in what it needs (declared in the config/environment.rb file), and then if it fails, check the stack trace to see where its error is.

+4
source

In my experience, this does not apply to Rails development.

+2
source

When using gems, read the README file in the github project repositories and look at the problems and wikis ... that should give you an idea of ​​which gem is compatible with your version of Rails. As for the structure, it is pretty stable .... major errors or corrections or releases are reported on weblog.rubyonrails.org

Things are growing gradually with each release, and this is obvious. There are some flaws that are well documented in Rails code and reported when the code runs.

+2
source

The rails themselves are quite complicated. I already did not see an error in the structure itself, until I duplicated open tickets.

If the problems you see have sneaked into several different areas:

  • We have moved as a community from Ruby 1.8.x to 1.9 in the last year or so, and some gems have a specific version of Ruby requirements that need to be checked before using them. Most popular gemstones are good and proven to work in multiple environments. Read the docs first.

  • Rails itself has matured significantly over the past few years, and this has meant many features are outdated. Lots of plugins there were written for an older version and expect behavior that is simply invalid. Read the docs first.

  • Several Ruby interpreters are now available (which is great), but sometimes they can have an effect on third-party code, but this is rare. Basically, some gems and plugins are expected to work on a particular interpreter. None of the really popular ones like this, but you need to know some gem builders - idiots. Read the docs first.

You may notice that at the end of each point there is a common theme: first read the documents. :-)

I would say that your experience is not typical of most Rails workflows, although we all have our best from time to time.

You will quickly find out which jewels are trustworthy, which ones you will need, but they can fight from time to time (mysql is the creature that kills me on OS X every time), and which ones you should avoid.

In general, however, the development cycle is more flexible (and you will grow at a faster pace) with Rails, as soon as you have your own relationship, and accept good practice. There is a reason we all love TDD and BDD, although if nothing else helps us get through the gem update, knowing that the material still works when a developer we don't know did something ridiculous: -)

0
source

Source: https://habr.com/ru/post/1314803/


All Articles