태그>rails(총 65개의 글)
'rails' 관련 최근글
-
- 같은 모델의 불특정한 여러 오브젝트의 값을 전달할때
-
프로그래밍 공부하자 by 후냄의 프로그래밍|2016/07/22 11:05
ex) db의 구성은 id, value, category 3가지로 이루어 지고 있으며 @models = Model.where(category:2) 위와같이 db를 조건에 맞추어 분류했을때 분류된 db의 정보를 일괄적으로 변경하기로 한다. <%= form_tag(model_edit_path) do %> model_..
- 같은 모델의 불특정한 여러 오브젝트의 값을 전달할때
-
- rails production 으로 서버 올리기
-
프로그래밍 공부하자 by 후냄의 프로그래밍|2016/06/13 18:46
database.yml 에서 production 부분을 설정 rake db:create RAILS_ENV=production; rake db:migrate RAILS_ENV=production; rake assets:precompile; 한 뒤 서버를 구동한다. 추가적으로 붙는 unicorn등도 production으로 구동해주어야한다.
- rails production 으로 서버 올리기
-
- AWS centos 환경에서 nginx + unicorn 연동
-
프로그래밍 공부하자 by 후냄의 프로그래밍|2016/06/03 12:19
unicorn 은 저번 글을 보고 설정하면 되므로 생략합니다. nginx 설정 /etc/nginx경로의 nginx.conf 을 수정한다. ######################################################user nginx;#worker_processes..
- AWS centos 환경에서 nginx + unicorn 연동
-
- AWS centos환경에서 unicorn 설정
-
프로그래밍 공부하자 by 후냄의 프로그래밍|2016/06/03 12:00
프로젝트 폴더에 들어가서 Gemfile을 수정한다. gem 'unicorn'을 추가 후 bundle install 해준다. 프로젝트폴더/config 경로에 unicorn.rb 파일을 만들고 다음을 입력해준다. ###########################################..
- AWS centos환경에서 unicorn 설정
-
- rails 프로젝트 생성및 mysql 연동
-
프로그래밍 공부하자 by 후냄의 프로그래밍|2016/05/27 17:36
기본적인 프로젝트생성은 1. rails new 프로젝트명 -skip-bundle ex) rails new project 2. Gemfile 수정 - gem 'therubyracer' 활성화 이상태에서는 rails에서 지원하는 sqlite db를 쓰게 된다 mysql db를 사용하여 프로젝트를 사용하고 싶으면 파일을 수정해주어야한..
- rails 프로젝트 생성및 mysql 연동
-
- [error]uninitialized constant Sprockets::Rails (NameError)
-
프로그래밍 공부하자 by 후냄의 프로그래밍|2016/05/12 15:50
uninitialized constant Sprockets::Rails (NameError) rails g model 명령어 사용시 위와 같이 뜨면 Gemfile 에서 bootstrap-sass 버젼을 낮추고 Gem update bundle install bundle update 를 해준다.
- [error]uninitialized constant Sprockets::Rails (NameError)
-
- [error]ActionController::InvalidAuthenticityToken in
-
프로그래밍 공부하자 by 후냄의 프로그래밍|2016/05/12 15:45
ActionController::InvalidAuthenticityToken in 와 같은 에러가 뜨면 해당 controller나 상위 controller의 rb파일을 다음과 같이 수정한다. protect_from_forgery with: :exception 위 구문을 주석처리한다
- [error]ActionController::InvalidAuthenticityToken in
-
- rails 4 mongoid tags 기능 mongoid-simple-tags
-
공부가 본업. by 언제나19|2016/03/21 01:30
acts-as-taggable-on가 있지만, ActiveRecord 용. acts-as-taggable-on-mongoid 는 2010년까지밖에 개발이 안됐으니, rails 4 를 지원하지 않겠다. mongoid_taggable_with_context도 개발이 중단됐고, rails 3까지만 지원한다. 다행히도, mongoid-s..
- rails 4 mongoid tags 기능 mongoid-simple-tags
-
- rails mongoid querying
-
공부가 본업. by 언제나19|2016/02/16 17:33
QueriesQueries + PersistenceScopingMap/Reduce Mongoid query for array field Model.where(category: { '$in': ['val1', 'val2'] }) Mongoid Rails 4 sort by asc or desc order created_at def index @books = Book.order_by(:cre..
- rails mongoid querying
-
- SimpleTokenAuthentication undefined local variable or method..
-
공부가 본업. by 언제나19|2015/12/05 14:57
$ rake db:create_indexes나 rails server하려고 하면, 아래 문제가 떴었는데, `': undefined local variable or method `acts_as_token_authenticatable' for User:Class (NameError) SimpleTokenAuthentication이 mongoid가 있는지 몰라서 ..
- SimpleTokenAuthentication undefined local variable or method..
-
- rails schema login devise crawling 삽질
-
공부가 본업. by 언제나19|2015/09/27 12:50
Rails 4 Could not dump table “users” because of following NoMethodError # undefined method `[]' for nil:NilClass schema에 table schema가 잘 안 만들어졌을 경우 잘 고쳐서 rake db:droprake db:migrate. undefined method `devise_for'..
- rails schema login devise crawling 삽질
-
- rails에서 reactjs쓰면서 Javascript 시작하기
-
공부가 본업. by 언제나19|2015/08/05 17:46
Getting a union of two arrays in JavaScript .union([34,35,45,48,49], [48,55]); 을 추가하면, reactjs가 잘 작동 안했다. $ bower install underscorejs //= require underscore/underscore bower, require로 추가했을 땐 문제 없었다. titles = Arr..
reactjs, javascript, rails, npm, nodejs
- rails에서 reactjs쓰면서 Javascript 시작하기