我已经安装rubyCAS Server在ec2服务器上,使用Rails 3.2和Ruby 1.9.3以及配置configure.yml文件,我的
server: webrick
port: 9292
ssl_cert: /mnt/rubyonrails/testingcas.pem
Run Code Online (Sandbox Code Playgroud)
注意:我fortestingonly.managemyasc.devserver在生成自签名SSL时提到了域名'
database:
adapter: mysql2
database: casserver
username: root
password: XXXXX
host: localhost
reconnect: true
authenticator:
class: CASServer::Authenticators::SQL
database:
adapter: mysql2
database: mmx_dev
username: root
password: XXXXX
host: localhost
user_table: userdemo
username_column: username
password_column: password
Run Code Online (Sandbox Code Playgroud)
,我也映射CAS服务器的URL在我的本地/etc/host的184.72.242.142 fortestingonly.managemyasc.devserver
在环境文件中: :cas_base_url => "https://fortestingonly.managemyasc.devserver:9292"
现在我已经启动了Rubycas服务器和我的应用程序服务器但是当我尝试访问我的应用程序URL时,在我的应用程序日志中出现以下错误:
Started GET "/" for 122.162.49.205 at 2014-01-31 04:01:14 -0800
Processing by DashboardController#index as HTML
Guessed service url: "http://ohio-ortho.managemyasc.devserver:3000/"
Generated login …Run Code Online (Sandbox Code Playgroud) 我正在不使用 Maven 的情况下实现 CAS 服务器,已正确配置,这是我的deployerConfigContext.xml配置:
<!-- This is the EntityManagerFactory configuration for Hibernate -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="generateDdl" value="true" />
<property name="showSql" value="true" />
</bean>
</property>
<property name="jpaProperties">
<props>
<!-- <prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>-->
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
p:driverClassName="com.mysql.jdbc.Driver"
p:url="jdbc:mysql://localhost:3306/testing"
p:password="***" p:username="root" />
Run Code Online (Sandbox Code Playgroud)
现在,当我尝试启动 CAS 服务器时,它抛出以下异常:-
2014-02-12 18:49:06,664 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed> …