2012-04-18 3 views
0

저는 여기에서 매우 긴 이야기를 짧게하려고 노력할 것입니다. 나는 우분투 서버에 RefineryCMS에서 응용 프로그램을 구축하고 있었고, 난이 다음과 같은 오류 메시지가 표시 시작할 때까지 모든 것이 잘 작동했다 :레일 URL이 작동하지 않습니다.

.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.12/lib/active_support/dependencies.rb:242:in `require': no such file to load -- devise (LoadError) 

나는에 의해

gem install devise 

을 따라 실행하여이 오류를 해결할 수 있었다

bundle install 

bundle update 

이 부팅하지 그것의 문제를 해결하지만, URL을 아무도 예 :/사용자/로그인으로 기본 포함 해 일하지 언제 내가 페이지 오류 등의

No route matches [GET] "https://stackoverflow.com/users/login" 

을 보여주는 것 같은 페이지로 이동 것 이것이 내 보석 세트의 문제 였다고 생각하여 새 것을 만들고 새로운 것을 만든 다음 내 파일을 그 위에 옮길 의도로 새로운 정제 응용 프로그램을 시작했습니다. 그 정유가 작동 된 보장을 부팅 그러나 때 기본 레일 페이지에 저를 데리고 /public/index.html 삭제 한 후 나는 다시 부팅하고 정유이었다 한 번 확인 같은 오류

No route matches [GET] "https://stackoverflow.com/users/login" 

있어 작업 나는 간단한 명령 행 명령을 실행하여 /app/views/pages/show.html.erb 파일을 덮어 쓰고 다시 부팅 한 다음 수동으로 사용자/등록 페이지에 URL을 입력하고 다시 같은 경로를 얻었습니다 오류. 어느 누구가 그러나 어느 수준에 관해 모르고 있지만 나의 길이 해석되고있는 길과 함께 그 약간의 이슈를 확인한다.

원래 응용 프로그램에서 레일스 버전 3.0.12, webrick 1.3.1 및 루비 1.9.2를 사용하고 있습니다.

현재이 내 Gemfile입니다 :

source 'http://rubygems.org' 

gem "devise" 
gem "savon" 
gem 'refinerycms-testing' 
gem "factory_girl_rails" 
gem "guard-rspec" 
gem "rspec" 

# gem 'rails', '3.0.0' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3', :require => 'sqlite3' 

# Use unicorn as the web server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'ruby-debug' 

# Bundle the extra gems: 
# gem 'bj' 
# gem 'nokogiri' 
# gem 'sqlite3-ruby', :require => 'sqlite3' 
# gem 'aws-s3', :require => 'aws/s3' 

# Bundle gems for the local environment. Make sure to 
# put test-only gems in this group so their generators 
# and rake tasks are available in development mode: 
# group :development, :test do 
# gem 'webrat' 
# end 

# REFINERY CMS ================================================================ 
# Anything you put in here will be overridden when the app gets updated. 

#gem 'refinerycms',    '~> 1.0.9' 

=begin #testing 
group :development, :test do 
    # To use refinerycms-testing, uncomment it (if it's commented out) and run 'bundle install' 
    # Then, run 'rails generate refinerycms_testing' which will copy its support files. 
    # Finally, run 'rake' to run the tests. 
    #gem 'refinerycms-testing' 
    gem 'capybara-webkit' 

    if RbConfig::CONFIG['target_os'] =~ /darwin/i 
     gem 'growl' 
    end 

    gem 'spork', '~> 0.9.0.rc', :platforms => :ruby 
    gem 'guard-spork', :platforms => :ruby 
    gem 'guard-rspec', :platforms => :ruby 
    gem 'generator_spec' 
end 

=end #testing 

# END REFINERY CMS ============================================================ 

# USER DEFINED 


    # Specify additional Refinery CMS Engines here (all optional): 
    # gem 'refinerycms-inquiries', '~> 1.0' 
    # gem "refinerycms-news",   '~> 1.2' 
    # gem 'refinerycms-blog',   '~> 1.6' 
    # gem 'refinerycms-page-images', '~> 1.0' 

    # Add i18n support (optional, you can remove this if you really want to). 
    #gem 'refinerycms-i18n',   '~> 1.0.0' 

# END USER DEFINED 

그리고 내 routes.rb 파일은 다음과 같습니다

Quicksmile::Application.routes.draw do 

    match "/" => redirect("/new-practices") 

    # The priority is based upon order of creation: 
    # first created -> highest priority. 

    # Sample of regular route: 
    # match 'products/:id' => 'catalog#view' 
    # Keep in mind you can assign values other than :controller and :action 

    # Sample of named route: 
    # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase 
    # This route can be invoked with purchase_url(:id => product.id) 

    # Sample resource route (maps HTTP verbs to controller actions automatically): 
    # resources :products 

    # Sample resource route with options: 
    # resources :products do 
    #  member do 
    #  get 'short' 
    #  post 'toggle' 
    #  end 
    # 
    #  collection do 
    #  get 'sold' 
    #  end 
    # end 

    # Sample resource route with sub-resources: 
    # resources :products do 
    #  resources :comments, :sales 
    #  resource :seller 
    # end 

    # Sample resource route with more complex sub-resources 
    # resources :products do 
    #  resources :comments 
    #  resources :sales do 
    #  get 'recent', :on => :collection 
    #  end 
    # end 

    # Sample resource route within a namespace: 
    # namespace :admin do 
    #  # Directs /admin/products/* to Admin::ProductsController 
    #  # (app/controllers/admin/products_controller.rb) 
    #  resources :products 
    # end 

    # You can have the root of your site routed with "root" 
    # just remember to delete public/index.html. 

    # See how all your routes lay out with "rake routes" 

    # This is a legacy wild controller route that's not recommended for RESTful applications. 
    # Note: This route will make all actions in every controller accessible via GET requests. 
    # match ':controller(/:action(/:id(.:format)))' 
end 

은 왜 하나 원에 정유 노선에 내장 된 인식을 중지하는 데 원인이 있습니다 응용 프로그램이나 새로운 하나의 사실 이후에 시작? 그것을 고칠 수있는 방법이 있습니까? 그렇지 않다면 올바르게 작동하는 지점으로 물건을 굴릴 수있는 방법이 있습니까?

답변

1

당신이 장치 설정의 일부를 수행했을 수도 있지만 모두가 아닌 것처럼 보입니다. 두 발전기를 모두 실행 했습니까?

rails generate devise:install 
rails generate devise User 

귀하의 routes.rb 일반적으로 같은 포함됩니다 : 올바르게 설정 된 경우 devise_for :users합니다. 이것은 user/sign_in과 같은 모든 경로를 만드는 것입니다.