Ответы пользователя по тегу Ruby on Rails
  • Как пофиксить ошибку PG::ConnectionBad could not connect to server?

    @r_o_r Автор вопроса
    прочел, что нужно отредактировать файл pg_hba.conf но не могу это сделать... пишет что отказанно в доступе.... блин как это обойти?
    Ответ написан
  • Почему проходит тест когда по идее этого не должно быть?

    @r_o_r Автор вопроса
    почистил кеш браузера, перезапустил сервак рельс... так же! Что блин за мистика...
    Вообще удалил все методы из файла контроллера и все равно могу зайти на странички и тест показывает что все ок. Чет я вообще в шоке.
    rake routes выдает
    Prefix Verb URI Pattern                   Controller#Action
     static_pages_home GET  /static_pages/home(.:format)  static_pages#home
     static_pages_help GET  /static_pages/help(.:format)  static_pages#help
    static_pages_about GET  /static_pages/about(.:format) static_pages#about
                  root GET  /                             application#hello


    Разобрался.... в пятых рельсах достаточно добавить роут и вьюху и будет рабочая ссылка. Даже если контроллер вообще не трогаем....
    Ответ написан
    Комментировать
  • Could not find gem 'sqlite3'. В чем может быть причина?

    @r_o_r Автор вопроса
    О! Есть прогресс после sudo apt-get install sqlite3 libsqlite3-dev Но теперь терминал выдает
    rails s
    Could not find gem 'sqlite3' in any of the gem sources listed in your Gemfile or available on this machine.
    Run `bundle install` to install missing gems.

    перед тем как запустить сервер делал bundle install и установка sqlite3 прошла успешно но в финале выдало ошибку на

    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /tmp/bundler20161123-3460-57vq0zdebug_inspector-0.0.2/gems/debug_inspector-0.0.2/ext/debug_inspector
    /usr/bin/ruby2.3 -r ./siteconf20161123-3460-5z3b6z.rb extconf.rb
    mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

    extconf failed, exit code 1

    Gem files will remain installed in /tmp/bundler20161123-3460-57vq0zdebug_inspector-0.0.2/gems/debug_inspector-0.0.2 for inspection.
    Results logged to /tmp/bundler20161123-3460-57vq0zdebug_inspector-0.0.2/extensions/x86_64-linux/2.3.0/debug_inspector-0.0.2/gem_make.out

    An error occurred while installing debug_inspector (0.0.2), and Bundler cannot continue.
    Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before bundling.


    Запустил sudo gem install debug_inspector -v '0.0.2' но выдало
    Building native extensions. This could take a while...
    ERROR: Error installing debug_inspector:
    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/debug_inspector-0.0.2/ext/debug_inspector
    /usr/bin/ruby2.3 -r ./siteconf20161123-4179-mk02jr.rb extconf.rb
    mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

    extconf failed, exit code 1

    Gem files will remain installed in /var/lib/gems/2.3.0/gems/debug_inspector-0.0.2 for inspection.
    Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debug_inspector-0.0.2/gem_make.out

    В чем может быть причина?
    Ответ написан
    Комментировать
  • Не получается настроить jabber клиент pidgin. Что я делаю не так?

    @r_o_r Автор вопроса
    Каким-то чудом получилось зайти в конфу через Qip... )
    Ответ написан
    Комментировать
  • Не хочет работать Slim в Rails. Как починить?

    @r_o_r Автор вопроса
    Все решилось просто -
    gem 'slim-rails'
    Все работает. Тема закрыта.
    Ответ написан
    1 комментарий