我查看了几个 github 问题和类似的帖子,但我无法弄清楚。我这里有我的路线:
<Router history={browserHistory}>
<Route path='/' component={Main}>
<IndexRoute component={Landing} />
<Route path='login' component={LoginContainer} />
<Route path='user' component={UserContainer} onEnter={checkAuth} >
<Route path='home' component={HomeContainer} />
<Route path='settings' component={SettingsContainer} />
<Route path='doc_attributes' component={AttributesContainer} />
<Route path='groups' component={GroupsContainer} />
<Route path='rules' component={RulesContainer} />
</Route>
<Route path='/dropbox/auth_finish' onEnter={doDropbox} />
<Route path='/box/auth_finish' onEnter={doBox} />
<Route path='/googledrive/auth_finish' onEnter={doGDrive} />
<Route path='/onedrive/auth_finish' onEnter={doOneDrive} />
</Route>
</Router>Run Code Online (Sandbox Code Playgroud)
以下是感兴趣的链接:
<li><Link to='/user/home' activeClassName="activeLink"><i className="fa fa-home fa-3x fa-fw" aria-hidden="true"></i></Link></li>
<li><Link to='/user/settings' activeClassName="activeLink"><i className="fa fa-wrench fa-3x fa-fw" aria-hidden="true"></i></Link></li>
<li><Link to='/user/groups' activeClassName="activeLink"><i className="fa …Run Code Online (Sandbox Code Playgroud)我在使用 Rails 4 Action Mailer 通过 gmail 发送电子邮件时遇到问题。一切本应如此简单……然而却行不通。具体来说,我得到
ArgumentError (SMTP-AUTH requested but missing secret phrase):
Run Code Online (Sandbox Code Playgroud)
我已经阅读了有关这种情况的其他问题,但大多数问题都有简单的修复(“user_name”而不是“username”,或者 ENV 变量是错误的)。我已经仔细检查过,并且确信我的凭据是正确的。这是我的development.rb的相关部分:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'mydomain.com',
user_name: ENV["GMAIL_USERNAME"],
password: ENV["GMAIL_PXXWRD"],
authentication: 'plain',
enable_starttls_auto: true
}
Run Code Online (Sandbox Code Playgroud)
我最初拥有纯文本形式的凭据,但我认为也许应该将它们移至环境变量来解决问题。它没有改变任何东西。请注意,我的 Gmail 是公司 Gmail,因此它实际上并不以“@gmail.com”结尾。我不确定这是否会改变什么,但我想我应该提一下。我也尝试过使用标准 Gmail 地址,但没有任何改变。
另外,“缺少秘密短语”是否是指密码错误?或者一开始就没有找到密码?还有什么可能导致错误?谢谢你们的宝贵时间。
正如标题所示,我有一个只有一个模块的 sbt 项目(目前),但test:compile没有捕获任何语法错误(并且 test 没有找到任何要运行的测试)。据我理解,sbt 项目带有 src/main 和 src/test 设置(src/it 需要配置)。我对 SBT 有点业余,但我会尽力提供所有相关信息:
结构:
Root
build.sbt
mymodule
build.sbt
src
main
scala
test
scala
Run Code Online (Sandbox Code Playgroud)
Root build.sbt(我认为这些配置是不必要的,但我很绝望):
lazy val `mymodule` = (project in file("mymodule"))
.configs(Test)
.settings(scalaSource in Test := baseDirectory.value / "test")
Run Code Online (Sandbox Code Playgroud)
MyModule build.sbt 基本上只是一个库依赖项列表(除非其中一个是问题所在,不确定),如下所示:
libraryDependencies ++= Seq(
"org.mockito" % "mockito-all" % "1.9.5" % "test",
"org.scalamock" %% "scalamock-core" % scalaMockVersion % "test",
"org.scalamock" %% "scalamock-scalatest-support" % scalaMockVersion % "test",
"org.codehaus.janino" % "janino" % "2.7.8",
"org.http4s" %% "http4s-dsl" % "0.11.2",
"org.http4s" …Run Code Online (Sandbox Code Playgroud) actionmailer ×1
gmail ×1
javascript ×1
jsx ×1
react-router ×1
reactjs ×1
router ×1
ruby ×1
sbt ×1
scala ×1
scalatest ×1