cap production deploy:upload_yml
Выполняю эту команду на сервере:
demo@test8CPU:~$ ~/.rvm/bin/rvm default do bundle exec rake assets:precompile
Could not locate Gemfile or .bundle/ directory
Но у меня присутствует Gemfile и в репозитории на Github и в моём проекте!
# routes.rb
namespace :admin do
resources :articles
resources :posts
end
# admin/articles_controller.rb
class Admin::ArticlesController < Admin::BaseController
...
end
# admin/base_controller.rb
class Admin::BaseController < ApplicationController
before_action :authenticate_admin!
layout 'admin'
protected
def authenticate_admin!
authenticate_user!
redirect_to :root unless current_user.admin?
end
end
gem 'rails-i18n'
gem 'simple_form'
gem 'slim'
gem 'gretel'
gem 'kaminari'
gem 'cocoon'
gem 'pg_search'
gem 'mini_magick'
gem 'jquery-fileupload-rails'
gem 'counter_culture'
gem 'devise'
gem 'devise-i18n'
gem 'carrierwave'
gem 'carrierwave-i18n'
gem 'ranked-model'
class SlaveClass
include SharedMethods
def blabla
meth2
end
end
module MasterModule
def self.do_some
SlaveClass.new.blabla
end
end
MasterModule.do_some
module SharedMethods
def meth1
puts 'meth1'
end
def meth2
puts 'meth2'
end
end
class Object
include SharedMethods
end
#
class SlaveClass
def blabla
meth2
meth1
end
end
module MasterModule
def self.do_some
SlaveClass.new.blabla
end
end
MasterModule.do_some
<?php
$str = '<div class=\"pt15\" style=\"margin-bottom: 1.5em;\"> Найдено 60097 человек </div> <div class=\"mf_ohd\" > <a style=\"position:relative; z-index:8; background-image: url(http://avt-22.foto.mail.ru/mail/ksyu.velikorodnyaya/_avatar?1414229584);\" class=\"mf_a90 booster-sc mf_fll mr30\" href=\"/mail/ksyu.velikorodnyaya/\" type=\"booster\"></a>';
if( preg_match('/Найдено (\d+) человек/', $str, $matches) ) {
echo $matches[1]; // 60097
}